Validate and save a batch of contracts
curl --request POST \
--url 'https://{{baseUrl}}/amlyze-ws-rest/batch-contracts' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contracts": [
{
"action": "CREATE",
"communicationNumber": "CommNumber0",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1",
"contractCode": "REG74121100",
"customerExtId": "ORG20231117550"
},
{
"action": "UPDATE",
"communicationNumber": "CommNumber1",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1232",
"contractCode": "REG74121101",
"customerExtId": "ORG20231117550"
}
]
}
'import requests
url = "https://{{baseUrl}}/amlyze-ws-rest/batch-contracts"
payload = { "contracts": [
{
"action": "CREATE",
"communicationNumber": "CommNumber0",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1",
"contractCode": "REG74121100",
"customerExtId": "ORG20231117550"
},
{
"action": "UPDATE",
"communicationNumber": "CommNumber1",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1232",
"contractCode": "REG74121101",
"customerExtId": "ORG20231117550"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contracts: [
{
action: 'CREATE',
communicationNumber: 'CommNumber0',
requester: 'financial_institution',
businessUnit: 'sandbox',
contractType: 'CREDIT_CARD',
extId: 'any_contract_1',
contractCode: 'REG74121100',
customerExtId: 'ORG20231117550'
},
{
action: 'UPDATE',
communicationNumber: 'CommNumber1',
requester: 'financial_institution',
businessUnit: 'sandbox',
contractType: 'CREDIT_CARD',
extId: 'any_contract_1232',
contractCode: 'REG74121101',
customerExtId: 'ORG20231117550'
}
]
})
};
fetch('https://{{baseUrl}}/amlyze-ws-rest/batch-contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"resultType": "REQUEST_ACCEPTED",
"communicationNumber": "CommNumber0",
"extId": "any_contract_1",
"businessUnit": "sandbox",
"timeElapsedMs": 203
},
{
"resultType": "REQUEST_REJECTED",
"communicationNumber": "CommNumber1",
"extId": "any_contract_2",
"businessUnit": "sandbox",
"errorCode": "O005",
"errorDescription": "CommunicationNumber already used in AMLYZE",
"timeElapsedMs": 20
}
],
"timeElapsedMs": 223
}{
"timestamp": "2024-05-26T16:49:50.237+00:00",
"status": 404,
"error": "Not Found",
"path": "/amlyze-ws-rest/batch-contracts"
}{
"resultType": "REQUEST_REJECTED",
"status": 500,
"error": "Internal Server Error"
}Contract
Validate and save a batch of contracts
This method sends data and imports contracts in AMLYZE.
POST
/
amlyze-ws-rest
/
batch-contracts
Validate and save a batch of contracts
curl --request POST \
--url 'https://{{baseUrl}}/amlyze-ws-rest/batch-contracts' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contracts": [
{
"action": "CREATE",
"communicationNumber": "CommNumber0",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1",
"contractCode": "REG74121100",
"customerExtId": "ORG20231117550"
},
{
"action": "UPDATE",
"communicationNumber": "CommNumber1",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1232",
"contractCode": "REG74121101",
"customerExtId": "ORG20231117550"
}
]
}
'import requests
url = "https://{{baseUrl}}/amlyze-ws-rest/batch-contracts"
payload = { "contracts": [
{
"action": "CREATE",
"communicationNumber": "CommNumber0",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1",
"contractCode": "REG74121100",
"customerExtId": "ORG20231117550"
},
{
"action": "UPDATE",
"communicationNumber": "CommNumber1",
"requester": "financial_institution",
"businessUnit": "sandbox",
"contractType": "CREDIT_CARD",
"extId": "any_contract_1232",
"contractCode": "REG74121101",
"customerExtId": "ORG20231117550"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contracts: [
{
action: 'CREATE',
communicationNumber: 'CommNumber0',
requester: 'financial_institution',
businessUnit: 'sandbox',
contractType: 'CREDIT_CARD',
extId: 'any_contract_1',
contractCode: 'REG74121100',
customerExtId: 'ORG20231117550'
},
{
action: 'UPDATE',
communicationNumber: 'CommNumber1',
requester: 'financial_institution',
businessUnit: 'sandbox',
contractType: 'CREDIT_CARD',
extId: 'any_contract_1232',
contractCode: 'REG74121101',
customerExtId: 'ORG20231117550'
}
]
})
};
fetch('https://{{baseUrl}}/amlyze-ws-rest/batch-contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"resultType": "REQUEST_ACCEPTED",
"communicationNumber": "CommNumber0",
"extId": "any_contract_1",
"businessUnit": "sandbox",
"timeElapsedMs": 203
},
{
"resultType": "REQUEST_REJECTED",
"communicationNumber": "CommNumber1",
"extId": "any_contract_2",
"businessUnit": "sandbox",
"errorCode": "O005",
"errorDescription": "CommunicationNumber already used in AMLYZE",
"timeElapsedMs": 20
}
],
"timeElapsedMs": 223
}{
"timestamp": "2024-05-26T16:49:50.237+00:00",
"status": 404,
"error": "Not Found",
"path": "/amlyze-ws-rest/batch-contracts"
}{
"resultType": "REQUEST_REJECTED",
"status": 500,
"error": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Batch of contracts to validate and save
Show child attributes
Show child attributes
⌘I