curl --request PUT \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/line-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"data": [
{
"quantity": 1073741823.5,
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discount": {
"amount": 4503599627370495,
"type": "amount"
},
"product": {
"name": "<string>",
"price": {
"currency": "AED",
"value": 4503599627370495
},
"description": "<string>",
"external_reference": "<string>",
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>",
"tax_rate_value": 5000,
"tax_status": "taxable",
"vat_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'{
"data": [
{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": {
"currency": "AED",
"value": 4503599627370495
},
"price_after_tax": {
"currency": "AED",
"value": 4503599627370495
},
"tax_rate": {
"country": "US",
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"name": "<string>",
"value": 5000
}
],
"is_custom": false,
"name": "<string>"
},
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"external_reference": "<string>",
"is_inline": false,
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"quantity": 1073741823.5,
"total_after_tax": 123,
"total_before_tax": 123,
"discount": {
"amount": 4503599627370495,
"type": "amount"
},
"tax_status": "taxable"
}
]
}Replace all line items of an existing invoice or quote with a new list of line items.
curl --request PUT \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/line-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"data": [
{
"quantity": 1073741823.5,
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discount": {
"amount": 4503599627370495,
"type": "amount"
},
"product": {
"name": "<string>",
"price": {
"currency": "AED",
"value": 4503599627370495
},
"description": "<string>",
"external_reference": "<string>",
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_name": "<string>",
"tax_rate_value": 5000,
"tax_status": "taxable",
"vat_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'{
"data": [
{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": {
"currency": "AED",
"value": 4503599627370495
},
"price_after_tax": {
"currency": "AED",
"value": 4503599627370495
},
"tax_rate": {
"country": "US",
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"name": "<string>",
"value": 5000
}
],
"is_custom": false,
"name": "<string>"
},
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"external_reference": "<string>",
"is_inline": false,
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"quantity": 1073741823.5,
"total_after_tax": 123,
"total_before_tax": 123,
"discount": {
"amount": 4503599627370495,
"type": "amount"
},
"tax_status": "taxable"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the entity that owns the requested resource.
"9d2b4c8f-2087-4738-ba91-7359683c49a4"
Show child attributes
Successful Response
Show child attributes
Was this page helpful?