# Generic API v1
The /generic
endpoints provide a flexible interface for handling various document types, including invoices, orders, and more. These endpoints are suitable for scenarios where a specific document type endpoint is unavailable or when custom document processing is required.
# Send
To send a document, use the POST /api/v1/{partyId}/generic/send
endpoint. Replace {partyId}
with the sender's partyId. The document should be included in the request body as a binary file with the content type multipart/form-data
.
The response will contain a documentId, which can be used to check to status of the document.
It's also possible to set your own documentId using the request headers: X-EConnect-DocumentId
{customdocumentid}
.
# Receive
To receive documents, set up a webhook to listen for incoming documents. Use the POST /api/v1/{partyId}/generic/receive
endpoint to receive an invoice. A hook is sent to the receiver containing the documentId
.
# Download
To download a received document, use the GET /api/v1/{partyId}/generic/{documentId}/download
endpoint. Replace {partyId}
with the receiver's partyId and {documentId}
with the ID received in the hook. The response body will contain the requested document.
For more detailed information, refer to the Generic API swagger UI.
← Purchase invoice Hook →