POST
/
invoices
Create an Invoice
curl --request POST \
  --url https://api.zivio.net/api/v3/invoices \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'zivio-tenant-id: <api-key>' \
  --data '{
  "type": "ItemisedInvoice",
  "description": "Invoice description",
  "ccy": "GBP",
  "job_id": "137",
  "due_on": "2020-11-01",
  "dated_on": "2020-10-21",
  "milestone_id": "78",
  "net_total_cents": "100000",
  "tax_total_cents": "20000",
  "total_cents": "120000",
  "invoice_items_attributes": [
    {
      "description": "Item description",
      "quantity": "5",
      "billing_start": "2020-11-01",
      "billing_end": "2020-11-03",
      "unit_type": "Hotel",
      "unit_cost_cents": "20000",
      "tax_type_id": "1"
    }
  ]
}'
{
  "id": "1",
  "status": "draft",
  "job_id": "23",
  "job_summary": "Some text about the project",
  "net_total": "16000.00",
  "tax_total": "2000.00",
  "total": "18000.00",
  "ccy": "GBP",
  "due_on": "2023-11-07T05:31:56Z",
  "milestone_id": "435",
  "line_item_sheet_id": "234",
  "credit_note_id": "124",
  "is_credit_note": "null",
  "credit_note_reason": "invoice paid in error",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "approved_at": "2023-11-07T05:31:56Z",
  "approved_by": {
    "id": "7158",
    "first_name": "Jack",
    "last_name": "Jones",
    "email": "jack_jones@example.com",
    "org_name": "Organisation Ltd",
    "org_id": "567",
    "business_unit": "Public Private Partnerships",
    "division": "Infastructure",
    "department": "Bridges",
    "vetting_status": "PASSED",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "custom_fields": {
      "key": "value"
    },
    "has_oversight": "<string>"
  },
  "client": {
    "id": "7158",
    "first_name": "Jack",
    "last_name": "Jones",
    "email": "jack_jones@example.com",
    "org_name": "Organisation Ltd",
    "org_id": "567",
    "business_unit": "Public Private Partnerships",
    "division": "Infastructure",
    "department": "Bridge Building",
    "vetting_status": "PASSED",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "custom_fields": {
      "key": "value"
    },
    "has_oversight": "<string>"
  },
  "client_org": {
    "id": "7158",
    "name": "Company Ltd",
    "is_external_client": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "supplier": {
    "id": "77",
    "name": "Company Inc",
    "email": "jack_jones@companyinc.com",
    "vetting_status": "PASSED",
    "tax_number": "9876543234",
    "tax_registered": "true",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required
zivio-tenant-id
string
header
required

Body

application/json
type
string
Example:

"ItemisedInvoice"

description
string
Example:

"Invoice description"

ccy
string
Example:

"GBP"

job_id
integer
Example:

"137"

due_on
string
Example:

"2020-11-01"

dated_on
string
Example:

"2020-10-21"

milestone_id
integer
Example:

"78"

net_total_cents
integer
Example:

"100000"

tax_total_cents
integer
Example:

"20000"

total_cents
integer
Example:

"120000"

invoice_items_attributes
object[]

Response

ok

id
integer
Example:

"1"

status
string
Example:

"draft"

job_id
integer
Example:

"23"

job_summary
string
Example:

"Some text about the project"

net_total
string
Example:

"16000.00"

tax_total
string
Example:

"2000.00"

total
string
Example:

"18000.00"

ccy
string
Example:

"GBP"

due_on
string<date-time>
milestone_id
integer
Example:

"435"

line_item_sheet_id
integer
Example:

"234"

credit_note_id
integer
Example:

"124"

is_credit_note
boolean
Example:

null

credit_note_reason
string
Example:

"invoice paid in error"

created_at
string<date-time>
updated_at
string<date-time>
approved_at
string<date-time>
approved_by
object
client
object
client_org
object
supplier
object