Refer to these Article links for more functional context on supplemental documents:
- To add Supplemental Documents to your Customer records, so that you can share these same attachments with your Customers
- To add Supplemental documents to your Customer's Invoice records, so that you can share these same attachments with your Customers
URL for uploading supplement documents
Use or Call this API to upload Supplement Documents into YayPay
/POST : https://app.yaypay.com/api/v1/contents?transaction_id={transId}&sync_id={syncId}
transId - Transaction id (this is required)
syncId - Unique identification of the synchronization process (this is not required)
Request Body:
Root element:
Field name |
Field Type |
Required |
Description |
---|---|---|---|
items |
Array of ItemElement |
true |
Root element |
Element ItemElement:
Field name |
Field Type |
Required |
Description |
---|---|---|---|
content |
Content Element |
true |
Contains information about the content |
integration |
Integration Element |
true |
Identification of content and sync type |
Element ContentElement:
Field name |
Field Type |
Required |
Description |
---|---|---|---|
base64_content |
String |
true |
File content in base64 format |
file_name |
String |
true |
Filename |
content_type |
String in content/type format |
true |
Supported content types: |
integration |
Integration Element |
true |
Relation to the exact entity and sync type |
supplementary_type |
SupplementaryType: |
true |
The supplement type of the file PAYMENT - links uploaded file to payment CREDIT_MEMO - links uploaded file to credit memo |
show_on_customer_portal | Bool | false | Makes the uploaded supplemental document available on the Customer Portal. |
attach_to_auto_reminders | Bool | false | Makes the uploaded supplemental document available in Workflows. |
Field name |
Field Type |
Required |
Description |
---|---|---|---|
internal_id |
String |
true |
Unique id of the entity from ERP system |
API Request examples
Invoice PDF upload
{ "items": [ { "content": { "base64_content": "IHNpbm1bGihfdskhld23kdndslWDD3sssss999sQAkkhpsdn2Yg", "file_name": "INV_43212342.pdf", "content_type": "application/pdf", "integration": { "internal_id": "invoice internal ID" }, "supplementary_type": "ERP_INVOICE_PDF", "show_on_customer_portal": false, "attach_to_auto_reminders": false }, "integration": { "internal_id": "Invoice PDF internal ID. Must be unique." } } ] }
Invoice supplemental document upload
{ "items": [ { "content": { "base64_content": "MHSfdsfsdg33skhld23kdndslWDD3sssss9934jdjddMNow", "file_name": "shipment.pdf", "content_type": "application/pdf", "integration": { "internal_id": "invoice internal ID" }, "supplementary_type": "ERP_INVOICE_PDF", "show_on_customer_portal": false, "attach_to_auto_reminders": false }, "integration": { "internal_id": "Supplemental document ID. Must be unique." } } ] }
Customer supplemental document upload
{ "items": [ { "content": { "base64_content": "dgGFfdkhk45kdndsl44fgfdgfdSWQaWDD3ssw3jKmshOPGlu", "file_name": "contract.pdf", "content_type": "application/pdf", "integration": { "internal_id": "Customer internal ID" }, "supplementary_type": "ERP_INVOICE_PDF", "show_on_customer_portal": false, "attach_to_auto_reminders": false }, "integration": { "internal_id": "Supplemental document ID. Must be unique." } } ] }
URL for deleting supplement documents
POST : https://app.yaypay.com/api/v1/contents/delete?transaction_id={transId}
transId - Transaction id (required)
With body:
Root element:
Field name |
Field Type | Required | Description |
---|---|---|---|
deleted_entities | Array of ItemElement | true | Root element |
Element ItemElement:
Field name |
Field Type |
Required |
Description |
---|---|---|---|
entity_type |
EntityType: CUSTOMER_SUPPLEMENTARY_DOCUMENT, INVOICE_SUPPLEMENTARY_DOCUMENT |
true |
The supplement type of content |
integration |
IntegrationElemement |
true |
Identification of content and sync type |
Element IntegrationElemement:
Field name |
Field Type |
Required |
Description |
---|---|---|---|
internal_id |
String |
true |
Unique id of the content entity from ERP system |
source |
String |
true |
Sync type (e.g. OTHER, CSV, NET_SUITE …) |
Request example: