Validate batch of contracts without saving

This method sends data only for validating JSON.

HTTP Method: POST

Path: {{baseUrl}}/amlyze-ws-rest/validate-batch-contracts

ContentType: application/json

Authorization: Basic Auth/Bearer Token

Validate batch of contracts with saving

This method sends data and imports contracts in Amlyze.

HTTP Method: POST

Path: {{baseUrl}}/amlyze-ws-rest/batch-contracts

ContentType: application/json

Authorization: Basic Auth/Bearer Token

API requests example

Fields

The data documentation can be found here.

List of possible responses

This part lists common responses after the submission of the request.

200 OK
{
  "results": [
    {
      "resultType": "REQUEST_ACCEPTED",
      "communicationNumber": "CommNumber0",
      "extId": "any_contract_1",
      "businessUnit": "businessUnit0",
      "timeElapsedMs": 203
    },
    {
      "resultType": "REQUEST_REJECTED",
      "communicationNumber": "CommNumber1",
      "extId": "any_contract_2",
      "businessUnit": "businessUnit1",
      "errorCode": "O005",
      "errorDescription": "CommunicationNumber already used in amlyze",
      "timeElapsedMs": 20
    },
  ],
  "timeElapsedMs": 223
}

404 Not Found
{
  "timestamp": "2024-05-26T16:49:50.237+00:00",
  "status": 404,
  "error": "Not Found",
  "path": "/amlyze-ws-rest/batch-contracts" //--> mistake inside the endpoint
}

500 Internal Server Error
{
  "resultType": "REQUEST_REJECTED",
  "status": 500,
  "error": "Internal Server Error"
}

List of possible errors

This section lists the possible errors that can occur when making a bad account request to the API. A bad request is a request that somehow does not follow the API specifications.

Error Description
extId is mandatory
code is mandatory