curl --location -g --request POST 'https://relay.exostack.cloud//api/invoicing/templates' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "string",
"invoice_number": "string",
"customer_id": 1,
"customer_code": "string",
"supplier_id": 1,
"supplier_code": "string",
"invoice_to_id": 1,
"invoice_to_code": "string",
"sales_rep_id": 1,
"sales_rep_code": "string",
"territory_id": 1,
"territory_code": "string",
"shipping_id": 1,
"shipping_code": "string",
"project_id": 1,
"project_code": "string",
"payment_term_id": 1,
"payment_term_code": "string",
"date": "2019-08-24T14:15:22.123Z",
"valid_until": "2019-08-24T14:15:22.123Z",
"description": "string",
"reference": "string",
"profile_offset": 0,
"language_code": "strin",
"price_level_id": 0,
"margin_type_id": 0,
"tax_context": {
"tax_group_id": 1,
"tax_group_code": "string",
"shipping_tax_exception_id": 1,
"shipping_tax_exception_code": "string"
},
"shipping": {
"amount": 0,
"description": "string",
"charter_id": 1,
"charter_code": "string",
"tax_exception_id": 1,
"tax_exception_code": "string"
},
"lines": [
{
"line_id": 1,
"product_id": 1,
"sku": "string",
"product_item_id": 1,
"description": "string",
"quantity": 0,
"ordered_qty": 0,
"invoiced_qty": 0,
"unit_price": 0,
"discount_percent": 0,
"selling_price": 0,
"product_group_id": 1,
"product_group_code": "string",
"charter_id": 1,
"charter_code": "string",
"project_id": 1,
"project_code": "string",
"tax_exception_id": 1,
"tax_exception_code": "string",
"taxes_included": true,
"price_level_id": 0
}
]
}'