Excluir uma compensacao
Removes an offset that has not been reversed, when its month is still open. Requires customer-credit-notes:update and receivables:update.
Authorization
bearer AuthorizationBearer <token>
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://api.biterp.ai/customer-credit-notes/{id}/offsets/{offsetId}"{
"offset": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_credit_note_id": "862efd95-ed5d-4081-99c1-933637a8ded2",
"receivable_id": "c5fdbd77-089d-4f8e-bf49-b02b6e7fc04a",
"amount": "60.000000",
"offset_date": "2019-08-24",
"reverses_offset_id": "5242642e-29dc-4af9-9cbf-95fc9e424654",
"reason": "string",
"notes": "string",
"created_at": "2019-08-24T14:15:22Z"
},
"note": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "open",
"balance": "38.930000",
"cancelled_amount": "0.000000"
},
"receivable": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "pending",
"remaining_amount": "39.000000",
"paid_at": "2019-08-24T14:15:22Z"
}
}{
"status_code": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"status_code": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"status_code": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"status_code": 422,
"message": "Could not resolve provided geography fields",
"error": "Unprocessable Entity",
"code": "string",
"details": {
"fields": {
"country_code": [
"Could not resolve country from '1112' (tried ISO2, ISO3, numeric code and names)"
],
"city": [
"Could not resolve city from 'CidadeQueNaoExiste' in country 'BR'"
]
}
}
}{
"status_code": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}
