biterp

Excluir uma compensacao

Removes an offset that has not been reversed, when its month is still open. Requires supplier-debit-notes:update and payables:update.

DELETE
/supplier-debit-notes/{id}/offsets/{offsetId}
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/supplier-debit-notes/{id}/offsets/{offsetId}"
{
  "offset": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "supplier_debit_note_id": "8397fd4e-cbf4-4f57-8758-cc52836dacc0",
    "payable_id": "4ac0291f-280d-472c-a7d1-40a998fb6aca",
    "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"
  },
  "payable": {
    "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"
}