Update invoice
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/invoices/{id}" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"reference_code": "string",
"series": "string",
"status": "draft",
"operation_type": "sale",
"product_type": "string",
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"customer": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"legal_name": "string",
"trade_name": "string",
"tax_id": "string"
},
"invoice_date": "2019-08-24",
"origin_state_code": "string",
"origin_country_code": "string",
"destination_state_code": "string",
"destination_country_code": "string",
"customer_tax_type": "individual",
"salesperson_name": "string",
"fiscal_notes": "string",
"internal_notes": "string",
"discount_amount": "string",
"discount_rate": "string",
"tax_engine_provider": "string",
"sales_order_id": "5e95a238-d0d8-4280-92bc-08d83c9c12a6",
"subtotal": "string",
"items_discount": "string",
"total_discount": "string",
"total_tax": "string",
"withheld_total": "string",
"net_receivable_total": "string",
"total": "string",
"items": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"sales_order_item_id": "0d4e920a-487c-47f5-9954-1e8d46c8c6a6",
"item_description": "string",
"quantity": "string",
"unit_price": "string",
"discount_amount": "string",
"po_number": "string",
"subtotal": "string",
"total": "string",
"position": 0,
"tax_resolution_id": "46335649-8ed5-4e65-adbe-1d06bb8bf9d7",
"br_data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_item_id": "a018106e-4ca4-4a01-ab85-3af044b569c5",
"ncm_code": "string",
"cest_code": "string",
"federal_service_code": "string",
"city_service_code": "string",
"nbs_code": "string",
"cnae_code": "string",
"ibs_cbs_cst": "string",
"ibs_cbs_classification": "string",
"ibs_cbs_operation_indicator_code": "string",
"ibs_cbs_is_personal_use": true,
"cfop": "string"
},
"us_data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_item_id": "a018106e-4ca4-4a01-ab85-3af044b569c5",
"hts_code": "string",
"tax_code": "string",
"sales_tax_category": "string"
}
}
],
"taxes": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",
"invoice_item_id": "a018106e-4ca4-4a01-ab85-3af044b569c5",
"tax_code": "string",
"tax_name": "string",
"base_amount": "string",
"rate": "string",
"amount": "string",
"jurisdiction": "string",
"is_withheld": true,
"is_included": true,
"source": "string",
"position": 0
}
],
"br_data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",
"nfse_number": "string",
"nfse_series": "string",
"nfse_verification_code": "string",
"operation_nature": "string",
"fiscal_emission_date": "2019-08-24",
"provider_status": "string",
"transmission_status": "queued",
"taxation_type": "string",
"external_invoice_id": "string",
"cancel_justification": "string",
"cancel_processing_status": "pending",
"cancel_processing_message": "string",
"processing_status": "string",
"processing_code": "string",
"processing_message": "string",
"submission_xml": "string",
"response_xml": "string",
"url": "string",
"cancel_access_key": "string",
"receiver_name": "string",
"receiver_federal_tax_number": "string",
"receiver_email": "string",
"receiver_phone": "string",
"receiver_address_street": "string",
"receiver_address_number": "string",
"receiver_address_district": "string",
"receiver_address_postal_code": "string",
"receiver_address_additional_information": "string",
"receiver_city_ibge_code": "string",
"receiver_city_name": "string",
"receiver_state_code": "string",
"receiver_municipal_registration": "string",
"receiver_state_registration": "string",
"receiver_state_registration_exempt": true,
"transmission_readiness": {
"ready": true,
"blockers": [
"wrong_item_count"
]
}
},
"us_data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",
"net_terms": 0
},
"warnings": [
{
"item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
"item_index": 0,
"code": "stale_tax_resolution",
"message": "string",
"changed_fields": [
{
"entity": "product",
"field": "string",
"snapshot_value": {},
"current_value": {}
}
],
"tax_resolution_id": "46335649-8ed5-4e65-adbe-1d06bb8bf9d7"
}
],
"deleted_by_user_id": "e06321af-43d5-4340-818b-555f83254c47",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}{
"statusCode": 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'"
]
}
}
}{
"statusCode": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"statusCode": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"statusCode": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}{
"statusCode": 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'"
]
}
}
}{
"statusCode": 404,
"message": "Customer not found",
"error": "Not Found",
"code": "CUSTOMER_NOT_FOUND"
}
