Add a line item to an invoice
Changed onAdds a line item to an existing draft invoice. The item will be added last in the list of line items on the invoice.
NOTE: The invoice must be in draft status.
Scope: invoices:write
Request
- Base URLhttps://api.bokio.se/v1
- URLhttps://api.bokio.se/v1/companies/{companyId}/invoices/{invoiceId}/line-items
- Auth
- HTTP bearer
- or OAuth 2Authorization code: /authorizeClient credentialsToken URL: /token scopes: invoices:write
Request body
Example request
{
"id": 1,
"itemRef": {
"id": "55c899c5-82b2-47fa-9c51-e35fc9b26443",
"description": "Installation work"
},
"description": "Installation work",
"itemType": "salesItem",
"productType": "services",
"unitType": "custom",
"customUnitType": "session",
"quantity": 10,
"unitPrice": 500,
"taxRate": 25,
"bookkeepingAccountNumber": 3389,
"discount": {
"type": "percentage",
"value": 10
},
"reverseChargeType": "construction",
"projectRef": {
"id": "4f8f6da6-4cbc-4bfc-8d23-67d5f6f2dd9b",
"projectName": "Website Redesign",
"projectNumber": "P-001"
},
"costCenterRef": {
"tagId": "7e5ee25f-1f5d-4e47-a26f-5d2d20fbef90",
"tagName": "Nord"
}
}Response
Line item added
Example response
{
"id": 1,
"itemRef": {
"id": "55c899c5-82b2-47fa-9c51-e35fc9b26443",
"description": "Installation work"
},
"description": "Installation work",
"itemType": "salesItem",
"productType": "services",
"unitType": "custom",
"customUnitType": "session",
"quantity": 10,
"unitPrice": 500,
"taxRate": 25,
"bookkeepingAccountNumber": 3389,
"discount": {
"type": "percentage",
"value": 10
},
"reverseChargeType": "construction",
"projectRef": {
"id": "4f8f6da6-4cbc-4bfc-8d23-67d5f6f2dd9b",
"projectName": "Website Redesign",
"projectNumber": "P-001"
},
"costCenterRef": {
"tagId": "7e5ee25f-1f5d-4e47-a26f-5d2d20fbef90",
"tagName": "Nord"
}
}Changes
- warning
added the new
customenum value to the//response property for the response status - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new
customenum value to the request property// - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- warning