id path parameter. Send the shipping fields nested under the Invoice object — all are optional, and only the fields you include (with a non-empty value) are applied:| Field | Meaning |
|---|---|
shipping_option_id | ID of a shipping option to apply |
shipping_amount | Shipping fee added to the invoice total |
shipping_tax_id | ID of the tax applied to the shipping fee |
shipping_number | Tracking/shipping number, recorded as the invoice's "Shipping Number" custom field |
0 values are ignored, so this endpoint can set or overwrite shipping fields but cannot clear them. A request that includes no shipping fields still returns a success response without changing the invoice.403 when no invoice matches the given ID.curl --location --globoff 'https://.daftra.com/api2/invoices/add_shipping/2415.json' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"Invoice": {
"shipping_option_id": 3,
"shipping_amount": 25,
"shipping_tax_id": 7,
"shipping_number": "TRK-123"
}
}'{
"result": "successful",
"code": 200,
"message": "Invoice shipping has been updated"
}