Requests
How to make API requests
An API request consist of:
The API supports
GET
to get a specific JSON object, like a purchase order, or to download a document (one JSON object or document is returned) or to query objects (a JSON collection is returned)POST
to create a new JSON object or upload a documentPUT
to update an existing JSON objectDELETE
to delete an existing JSON object or document
Use the
Content-Type: application/json
header in case of POST
or PUT
with a JSON body.Use the
Content-Type: application/xml
header in case of PUT
with an XML body.The API uses the REST software architectural style that defines a set of constraints to be used for creating Web services. The API additionally uses a command and query style.
An URL is build up like this:
https://environment/service/method/parameters?parameters
Each environment has a set of services which you can find on each environment page, like the acceptance test environment and production environment
On the environment page for each service the API endpoint you can find the OpenAPI 2.0 Specification YAML file, the OpenAPI UI rendering, the health and label (version) is published.
Common used services are:
authentication
for authentication, to get a tokenapi-connector
for buyer and supplier ERP integrationobject-storage
to upload and download documentsorder
for order/line commandsorder-search
for order queriesorder-line-search
for order-line queriessci-connector
for buyer ERP integration using SCSN
In each OpenAPI 2.0 Specification you can find the methods supported by the service. For example the
api-connector
service:POST /api-connector/order-response
sends an order response by the supplierA request can have a path parameter such as an
{id}
in object-storage
service download
method:A GET request can have a query parameter such as a
query
in company-search
:A POST request has a JSON body (payload), such as a purchase order sent to the
api-connector
service order
method:{
"order": {
"companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"supplierAccountNumber": "12345",
"purchaseOrderNumber": "PO123456789",
"destination": {
...
- JSON strings: for date/time values ISO 8601 date format
YYYY-MM-DD
or local date/time formatYYYY-MM-DDThh:mm:ss
is used
A request can have an XML body, such as purchase order sent to the
sci-connector
service order
method:<?xml version="1.0" encoding="UTF-8"?>
<Order>
<ID>123</ID>
<IssueDate>2018-10-06</IssueDate>
<Note>[Free-form text]</Note>
<BuyerCustomerParty>
...
Last modified 1yr ago