Atualizar conta a receber
Atualiza uma conta a receber. Os campos aceitos dependem do `status`: `pending`/`overdue` aceitam todos; `paid` e `partial` aceitam somente `notes`, `financial_category_id` e `metadata`; `cancelled` nao aceita nenhum, nem corpo vazio. Campo nao permitido para o status atual retorna 422 nomeando o campo. Para liberar os demais, desfaca, estorne ou desvincule a baixa - a edicao total volta quando o status recalculado for `pending` ou `overdue`, conforme o vencimento; um titulo dentro do prazo e ainda com valor baixado permanece `partial` e continua restrito.
Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.biterp.ai/receivables/{id}" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"record_number": 0,
"customer_id": "string",
"financial_account_id": "string",
"payment_method_id": "string",
"financial_category_id": "string",
"reference_code": "string",
"amount": "1500.000000",
"discount_amount": "0.000000",
"surcharge_amount": "0.000000",
"status": "pending",
"issue_date": "2019-08-24",
"due_date": "2019-08-24",
"paid_at": "2019-08-24T14:15:22Z",
"installment_group_id": "string",
"installment_number": 0,
"installment_count": 0,
"sales_order_id": "string",
"invoice_id": "string",
"description": "string",
"notes": "string",
"metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_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": 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",
"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"
}
