Integrations & ERP Custom Fields / API Developer Documentation

Supplemental Documents via API

Refer to these Article links for more functional context on supplemental documents:


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:
ERP_INVOICE_PDF (default), INVOICE, CUSTOMER, PAYMENT, CREDIT_MEMO

true

The supplement type of the file

ERP_INVOICE_PDF - pdf that is shown on the statement page

INVOICE - links uploaded file to the invoice

CUSTOMER - links uploaded file to the customer

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.

Element IntegrationElemement:

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:



Can't find what you need?

Contact our support team support@yaypay.com for help.