POST
/
v2
/
invoice
curl --request POST \
  --url https://api.sonderplan.com/v2/invoice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "prefix": "INV-",
  "number": 892,
  "date": 1547501100,
  "date_time_iso": "2022-02-22T09:00:00+11:00",
  "due_date": 1547501100,
  "due_date_time_iso": "2022-02-22T09:00:00+11:00",
  "items": [
    {
      "id": 982342,
      "item_text": "Edit Suite 1 Grading",
      "item_uuid": "r2394",
      "ratescheme_id": 989234,
      "description": "Session booked between 10th Jan -> 12th Jan 2023",
      "quantity": "2.4",
      "unit": "hourly",
      "unit_amount": "20.65",
      "unit_buy_amount": "10.15",
      "tax": true,
      "taxes": [
        {
          "id": 3247,
          "name": "GST",
          "rate": "10.00",
          "total": "151.00"
        }
      ],
      "discount": "20.00%",
      "buy_total": "200.00",
      "buy_total_fixed": false,
      "order": 2,
      "parent_group_id": 234842
    }
  ],
  "groups": [
    {
      "id": 23425,
      "name": "Video Editing Services",
      "description": "Includes all editing services",
      "order": 2,
      "hide_items": true
    }
  ],
  "status": [
    {
      "id": 2
    }
  ],
  "project": [
    {
      "id": 2342354
    }
  ],
  "client": [
    {
      "uuid": "p4",
      "contact_person": {
        "id": 2837
      }
    }
  ],
  "custom_fields": [
    {
      "id": 7823,
      "name": "Type",
      "value": "Video Editing",
      "value_id": 8973,
      "update_key": "2_1_7823"
    }
  ],
  "terms": "Payment to be made in 30 days",
  "template_id": 213,
  "cloned_id": 545647,
  "reference": "QU-9893",
  "currency": "AUD",
  "created_sp_flag": "true"
}'
{
  "success": {
    "id": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

validation_mode
enum<string>
default:strict

What validation method should the api use

Available options:
strict,
auto_correct

Body

application/json
Invoice object that needs to be added

Standard invoice model that returns most properties by default

client
object[]
required

Client model with some fields

id
integer

Automatically generated unique invoice id

Example:

1

prefix
string

Prefix to the invoice number

Example:

"INV-"

number
integer

Number of the invoice

Example:

892

date
integer

Unix time of the invoice date

Example:

1547501100

date_time_iso
string

ISO-8601 formatted result of the invoice date

Example:

"2022-02-22T09:00:00+11:00"

due_date
integer

Unix time of the invoice due date

Example:

1547501100

due_date_time_iso
string

ISO-8601 formatted result of the invoice due date

Example:

"2022-02-22T09:00:00+11:00"

items
object[]

Standard invoice item model that returns all properties by default

groups
object[]

Standard invoice item groups model that returns all properties by default

status
object[]

Invoice specific status model

project
object[]

Simplified project model containing only a subset of fields

custom_fields
object[]

Used to show the values of custom fields on linked modules

terms
string

Specific terms for this invoice

Example:

"Payment to be made in 30 days"

template_id
integer

The template id selected for this invoice, 0 = Default or no template

Example:

213

cloned_id
integer

The id of the quote or invoice that this was duplicated from

Example:

545647

reference
string

Text reference to a quote, invoice or purchase order

Example:

"QU-9893"

currency
string

Currency code (three character format) that this invoice is in

Example:

"AUD"

created_sp_flag
boolean

True if this invoice was created in Sonderplan

Example:

"true"

Response

200
application/json
Successful Operation
success
object