Skip to main content

Getting Started

Login

In order to use the collectAI API you need a client_id and a client_secret to receive a valid access token. Keep in mind the token is valid for 1h, a new token has to be requested once it expired.

note

The API Reference can be found here.
If you are missing the API credentials, please get in touch with our onboarding team

Example

curl -i -d client_id=myId -d client_secret=mySecret -d grant_type=client_credentials https://api.collect.ai/token

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Date: Wed, 15 Aug 2018 12:03:22 GMT
Server: nginx
Content-Length: 100
Connection: keep-alive

{"access_token":"myToken","token_type":"bearer","expires_in":3600}

Create claims

The API allows you to create claims in a convenient way (see the example below).

Keep in mind, every claim you create needs to be attached to a specific merchant account. This merchant account must be setup (landing page, payment methods, communication strategy, features, etc...) together with our onboarding team to get the best end-customer experience.

Example

//claim.json
[
{
"debtorName": "Han",
"debtorLastName": "Solo",
"email": "han.solo@email.com",
"mobileNumber": "+49162123456",
"referenceNumber": "ref-1234567",
"currency": "EUR",
"items": [{
"reference": "invoice-3866",
"type": "PRIMARY",
"value": "1099", //cents
"itemDate": "2020-01-09",
"dueDate": "2020-01-31"
}]
}
]
curl -X POST -H "Authorization: Bearer myToken" -H "Content-Type: application/json" -d @claim.json https://api.collect.ai/merchants/1/claims

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
Date: Wed, 15 Aug 2018 12:03:22 GMT
Server: nginx
Content-Length 99
Connection: keep-alive
{
"error": null,
"result": [
{
"id": 1250881,
"referenceNumber": "ref-1234567",
"error": null,
"result": null
}
]
}