Skip to main content

Create transactions

Understand how to create new transactions in Proactis

Creating transactions using a RESTful API involves sending an HTTP POST request to the appropriate endpoint with the necessary data. The process first requires you to check the data model of the data type you want to create. This helps you ensure all required properties are included in your request. Make sure to check the data model because each API has it's own. Next, you are ready to perform the operation.

Use a valid data model

Each integration may have different requirements to the request body of the operation. So, before triggering the operation, you need to know how the data should be inserted into Proactis. You can access the integration-specific model requirements using this API documentation.

Perform the operation

Let's try creating a new receipt using our Receipt Import endpoint. The request body should be a XML object which conforms to the structure of the cXML standard.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.021/Fulfill.dtd">
<cXML xml:lang="en" payloadID="[email protected]" timestamp="2021-08-06T10:27:32-10:27">
<Header>
<From>
<Credential domain="NetworkId">
<!-- Proactis customer identifier -->
<Identity>Demo</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkId">
<!-- Proactis supplier identifier -->
<Identity>SUP0005</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkId">
<!-- Proactis customer identifier -->
<Identity>Demo</Identity>
</Credential>
<UserAgent>User Agent</UserAgent>
</Sender>
</Header>
<Request deploymentMode="production">
<ReceiptRequest>
<!-- REQUIRED: Receipt number and receipt date/time -->
<ReceiptRequestHeader receiptID="20230614001" receiptDate="2023-06-14T12:01:00" />
<!-- REQUIRED: Remove the closeForReceiving=yes attribute in case additional receipts for the order are expected -->
<ReceiptOrder closeForReceiving="yes">
<ReceiptOrderInfo>
<!-- REQUIRED: Proactis order number. Order date doesn't have to match -->
<OrderReference orderID="00070651" orderDate="2023-01-18T09:40:03">
<!-- REQUIRED: Mandatory element for cXML. not used for retrieving the correct order -->
<DocumentReference payloadID="[email protected]"/>
</OrderReference>
</ReceiptOrderInfo>
<!-- REQUIRED: line number of the receipt, quantity received and indicator whether receiving is completed for this line -->
<ReceiptItem receiptLineNumber="1" quantity="1" completedIndicator="yes">
<!-- REQUIRED: Order line number -->
<ReceiptItemReference lineNumber="1">
<ItemID>
<!-- REQUIRED: Article number -->
<SupplierPartID>PEN001</SupplierPartID>
</ItemID>
<!-- OPTIONAL: short product name -->
<Description xml:lang="nl-NL">
<ShortName>Pen Red</ShortName>
</Description>
</ReceiptItemReference>
<!-- REQUIRED -->
<UnitRate>
<!-- REQUIRED: currency code and price per unit -->
<Money currency="EUR">1.00</Money>
<!-- REQUIRED: unit of measure -->
<UnitOfMeasure>PCE</UnitOfMeasure>
</UnitRate>
<!-- REQUIRED: Not used but mandatory by cXML -->
<ReceivedAmount>
<!-- REQUIRED: Not used but mandatory by cXML. Money value received -->
<Money currency="EUR">1.00</Money>
</ReceivedAmount>
<!-- REQUIRED: Receiving status. Status is configured in Proactis -->
<Classification domain="ItemReceivingCondition" code="Delivery is ok">Delivery is ok</Classification>
</ReceiptItem>
</ReceiptOrder>
<!-- REQUIRED: Not used but mandatory by cXML -->
<Total>
<!-- REQUIRED: Not used but mandatory by cXML. Total receipt value -->
<Money currency="EUR">1.00</Money>
</Total>
</ReceiptRequest>
</Request>
</cXML>
tip

Proactis APIs do not support bulk updates. You can work on only one object per request.

Whenever the sent request is according to the data model the endpoint will return a HTTP 200, 201 or 202, meaning the request has been received and will be processed. Functional errors will be displayed in the widget.

Monitor the status of your operation

The response of the request will display the status. Another option is to check the widgets in Proactis.