Invoice

Patch method to partially update an invoice

Changed on

Currently only used to void an invoice by updating the invoice status

patch/billing/v1/invoices/{invoiceNumber}

Request

Path parameters

invoiceNumberinteger required

The unique identifier of the invoice that should be patched.

Request body

creationDatenumber nullable

Creation date for the invoice.

orderIdsstring[]

Array of Order IDs

currency'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN'

Supported currencies for the system

dueDatenumber nullable

Due date for the invoice.

invoiceIdnumber nullable

Invoice ID.

referenceNumberstring nullable

Reference number.

status'PAID' | 'UNPAID' | 'CARRIED' | 'VOIDED'
totalnumber nullable

Invoice total.

Example request

{
  "company": {
    "href": "...",
    "id": "..."
  },
  "orderIds": [
    "1234"
  ],
  "creationDate": 12345,
  "currency": "KRW",
  "delegatedToInvoice": {
    "href": "...",
    "id": "..."
  },
  "dueDate": 12345,
  "includedInvoices": [
    {
      "href": "...",
      "id": "..."
    },
    {
      "href": "...",
      "id": "..."
    }
  ],
  "invoiceId": 12345,
  "invoiceLines": [
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "ITEM"
    },
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "TAX"
    }
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "referenceNumber": "...",
  "status": "VOIDED",
  "total": 12345,
  "user": {
    "href": "...",
    "id": "..."
  }
}

Response

OK

creationDatenumber nullable

Creation date for the invoice.

orderIdsstring[]

Array of Order IDs

currency'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN'

Supported currencies for the system

dueDatenumber nullable

Due date for the invoice.

invoiceIdnumber nullable

Invoice ID.

referenceNumberstring nullable

Reference number.

status'PAID' | 'UNPAID' | 'CARRIED' | 'VOIDED'
totalnumber nullable

Invoice total.

Example response

{
  "company": {
    "href": "...",
    "id": "..."
  },
  "orderIds": [
    "1234"
  ],
  "creationDate": 12345,
  "currency": "KRW",
  "delegatedToInvoice": {
    "href": "...",
    "id": "..."
  },
  "dueDate": 12345,
  "includedInvoices": [
    {
      "href": "...",
      "id": "..."
    },
    {
      "href": "...",
      "id": "..."
    }
  ],
  "invoiceId": 12345,
  "invoiceLines": [
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "ITEM"
    },
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "TAX"
    }
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "referenceNumber": "...",
  "status": "VOIDED",
  "total": 12345,
  "user": {
    "href": "...",
    "id": "..."
  }
}

Changes