API Guide Items- Invoices - Add New invoice

Invoices - Add New invoice

POST yourdomain.com/api/invoices

Header

json
Field Type Description
Authorization String

Basic Access Authentication token.

Parameter

json
Field Type Description
clientid Number

Mandatory. Customer id

number Number

Mandatory. Invoice Number

date Date

Mandatory. Invoice Date

currency Number

Mandatory. currency field

newitems Array

Mandatory. New Items to be added

subtotal Decimal

Mandatory. calculation based on item Qty, Rate and Tax

total Decimal

Mandatory. calculation based on subtotal, Discount and Adjustment

billing_street String

Mandatory. Street Address

allowed_payment_modes Array

Mandatory. Payment modes

billing_city (optional) String

Optional. City Name for billing

billing_state (optional) String

Optional. Name of state for billing

billing_zip (optional) Number

Optional. Zip code

billing_country (optional) Number

Optional. Country code

include_shipping (optional) boolean

Optional. set yes if you want add Shipping Address

Default value: no

show_shipping_on_invoice (optional) boolean

Optional. Shows shipping details in invoice.

shipping_street (optional) String

Optional. Address of shipping

shipping_city (optional) String

Optional. City name for shipping

shipping_state (optional) String

Optional. Name of state for shipping

shipping_zip (optional) Number

Optional. Zip code for shipping

shipping_country (optional) Number

Optional. Country code

duedate (optional) Date

Optional. Due date for Invoice

cancel_overdue_reminders (optional) boolean

Optional. Prevent sending overdue remainders for invoice

tags (optional) String

Optional. TAGS comma separated

sale_agent (optional) Number

Optional. Sale Agent name

recurring (optional) String

Optional. recurring 1 to 12 or custom

discount_type (optional) String

Optional. before_tax / after_tax discount type

repeat_every_custom (optional) Number

Optional. if recurring is custom set number gap

repeat_type_custom (optional) String

Optional. if recurring is custom set gap option day/week/month/year

cycles (optional) Number

Optional. number of cycles 0 for infinite

adminnote (optional) String

Optional. notes by admin

removed_items (optional) Array

Optional. Items to be removed

clientnote (optional) String

Optional. client notes

terms (optional) String

Optional. Terms

Success 200

json
Field Type Description
status Boolean

Request status.

message String

Invoice Added Successfully

Error 4xx

json
Name Type Description
status Boolean

Request status.

message String

Invoice add fail

newitems[] String

The Items field is required

number String

The Invoice number is already in use

allowed_payment_modes[] String

The Allow Payment Mode field is required

billing_street String

The Billing Street field is required

subtotal String

The Sub Total field is required

total String

The Total field is required

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Invoice Added Successfully"
}
  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Total field is required"
	    },
	    "message": "<p>The Total field is required</p>\n"
	}

Did you find this article useful?