Skip to main content

Push transactions

How to set up pushing of transactions from Proactis

For transactional documents the Proactis API supports the option to POST the document to a specified endpoint each time the document reaches the correct status. For requisitions, ERP orders, receipts and timecards the status is fixed, for invoices the status is configurable.

Document types

The option to push documents to a specified customer application is only available for transactional documents: requisitions, ERP orders, receipts, invoices and timecards. All other documents require a GET request initiated by the client application.

Configuration of the endpoint, and in some cases the preferred export status, can be done thru the Communication Settings. Communication settings endpoints are available in the API reference or Swagger.

Communication settings

Configuration of the Communication Settings is usually done once for every environment and won't change unless the endpoint changes. Depending on your requirements the API has methods to setup, retrieve, update or delete endpoint configuration.

Document types like the requisition, receipt, invoice and timecard support one endpoint. The ERP order supports multiple endpoints. In that case each endpoint will receive the same message.

Communication settings support the following configuration items:

ElementDescription
idEndpoint name: A unique name for the endpoint. This is supported for ERP orders only
urlEndpoint URI: The endpoint supports URIs starting with http://, https://, ftp:// or sftp://
multipartContentTypeAttachment Type: To setup a default multipart content-type whenever the client application requires a different one from the default multipart/mixed
contentTypeContent Type: Configure a default content type whenever the client application requires a different one from the default application/xml
authenticationsThe communication settings support zero, one or multiple authentication types. For example the type OAUTH2 and API_KEY can be used together
     typeAuthentication type: Specify the type of authentication to be performed for the specified endpoint. Possible types: BASIC (for Basic Authentication), USERNAME_PASSWORD (for FTP or SFTP), OAUTH2 (only Client Credentials flow is supported) or API_KEY
     usernameUsername: To be used with Authentication type BASIC or USERNAME_PASSWORD
     passwordPassword: To be used with Authentication type BASIC or USERNAME_PASSWORD
     clientIdClient ID: OAuth Client ID for the client credentials flow. To be used with Authentication type OAUTH2
     clientSecretClient Secret: OAuth Client Secret for the client credentials flow. To be used with Authentication type OAUTH2
     scopeScope: Optional OAuth scope for the client credentials flow. To be used with Authentication type OAUTH2. Multiple scopes have to be separated by spaces
     tokenUrlToken URL: URL to retrieve the OAuth client credentials token. To be used with Authentication type OAUTH2
     apiKeyHeaderNameAPI Key Header name: The name of the API Key HTTP header. To be used with Authentication type API_KEY
     apiKeyAPI Key: A fixed value which is used for the API Key HTTP header. To be used with Authentication type API_KEY
headersAdditional custom HTTP-headers can be set for each POST request. Specify these additional HTTP-headers as a key/value pair. Currently supported for ERP orders only
     header-nameheader-value
exportStatusInvoice Export Status: Invoices can be exported in one or multiple statuses. Invoices will be exported once the invoice reaches the specified status. Possible statuses: CONCEPT, EXCEPTION, FORAPPROVAL, PROCESSED, CLEARED, SENT, ONHOLD, FORVALIDATION, REJECTED, DELETED, ARCHIVED, FOREVALUATION

Response

Processed messages will be added to the relevant widgets. These widgets will also show the result of the delivery based on the response received from the endpoint. The API expects a cXML response and is able to update the widget status depending on the code attribute. In case of an error, the contents of the Status element will be shown in the widget.

<?xml version="1.0"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd">
<cXML version="1.2.011" payloadID="20211105102252322.f3922af03e1911ecb9bbae8b9e28f068" timestamp="2023-06-20T10:22:52-CET">
<Response>
<Status code="200" text="OK"></Status>
</Response>
</cXML>

Example configuration

Below you will find example configurations for most used cases. Remove the comments before posting the communication settings to the API.

Requisition

{
"url": "https://endpoint.com/requisition" // URL where the requisition will be sent to
}

ERP order

{
"id": "My endpoint name", // A unique name for the endpoint
"url": "https://endpoint.com/order", // URL where the order will be sent to
"includeAttachments": false // Will remove attachments
}

Receipt

{
"url": "https://endpoint.com/receipt" // URL where the receipt will be sent to
}

Invoice

{
"url": "https://endpoint.com/invoice", // URL where the invoice will be sent to
"exportStatus":
[
"PROCESSED" // Invoice will be exported in PROCESSED status
]
}

Timecard

{
"url": "https://endpoint.com/timecard" // URL where the timecard will be sent to
}