invoices

Add a line item to an invoice

Changed on

Adds 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

post/companies/{companyId}/invoices/{invoiceId}/line-items

Request

  • Base URL
    https://api.bokio.se/v1
  • URL
    https://api.bokio.se/v1/companies/{companyId}/invoices/{invoiceId}/line-items
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: /authorize
      Client credentials
      Token URL: /token scopes: invoices:write

Request body

OR

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

OR

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 custom enum 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 custom enum 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