Skip to main content

Update Claims Use Case

To update a claim, you can send a POST request similar to the one used to create the import_claims, but with the new values for the fields that you want to update.

Example:

Let’s assume that John Doe missed their payment, and you need to increase the amount of fees now to 3 euros. To do this, you can send the following request:

POST /v1/3d132b18-6b6f-4f7c-b464-6a8ee7ca5235/import_claims HTTP/1.1
Host: api.receeve-demo.com
Content-Type: application/json
Authorization: {{access_token}}

{
"claim1": {
"amount": 2000,
"totalFees": 300,
"currency": "EUR",
"currentDueDate": "2019-02-15",
"originalDueDate": "2018-09-09",
"primaryDebtor": {
"lastName": "Doe",
"firstName": "John",
"debtorReference": "JOHN_DOE_ID",
"contactInformation": {
"country": "DE",
"email": "john.doe@acme.com",
"mobileNumber": "+49123456789"
}
}
}
}

With this, you are always updating the claim with the current state of your system, but if you only want to update certain fields of the claim, you can use the update_claims endpoint. This shares the same structure as the import_claims endpoint, but it only updates the fields that you specify.

Example:

Let’s assume that John Doe missed the payment again, and you need to increase the amount of fees now to 5 euros. To do this, you can send the following request:

POST /v1/3d132b18-6b6f-4f7c-b464-6a8ee7ca5235/update_claims HTTP/1.1
Host: api.receeve-demo.com
Content-Type: application/json
Authorization: {{access_token}}

{
"claim1": {
"totalFees": 500
}
}

The response will be a JSON similar to:

{
"claim1": {
"success": true,
"messageIds": ["86c2e026-0711-4c2b-bbcc-c764691a63cb"],
"messages": ["Successfully updated claim claim1"]
}
}

Notes:

  • The messages are human-readable messages that can be used for debugging.
  • The messageIds represent the unique identifier for the intention of importing each claim. They can be used to track the side effects within the system.
  • The result of the intention of updating each claim is reported back with the success flag. If it returns false, the claim was not updated and the message will include the details of the error.

FAQ

  • How can I get an Access Token? You can get a token using the Authentication Use Case
  • Why would I use the update_claims endpoint instead of the import_claims endpoint? The import_claims endpoint is used to create/update claims. In comparison, the update_claims endpoint is used exclusively to update existing claims. However, it has the advantage that you can send only the fields that you want to update. This is useful if you want to update only the amount of the claim, for example.
  • Is there a hard limit on the number of claims that I can update/import at once? Yes, there are some hard limits to consider. First, the claim’s total size can be up to 200 Kb max (including the metadata). Second, the rate limit is 30 Requests per minute, and the request can include multiple claims, depending on the type of request:
    • Asynchronous request: 30 Claims per request
    • Synchronous request: 5 Claims per request This means that we have a throughput of:
    • 900 Claims/min (async) - 150 Claims/min (sync)
    • 54,000 Claims/hr (async) - 9,000 Claims/hr (sync)

Related Pages