The following resources are applicable:
Mount Point: /rest/v2/sales_invoices
The following operations are supported on this resource:
RESTful service to retrieve all of the available sales invoices URL. e.g. performing a HTTP GET request to: http://
name | description | type | default |
---|---|---|---|
firstResult | Optional, defaults to 0, Used for pagination, the firstResult query parameter specifies the first record to be returned by the ‘List All Sales Invoices’ end point. The parameter is 0 index-based, and so if requesting the first sales invoice in the list of sales invoices, firstResult should be set to 0. The firstResult parameter is optional, and the default value for firstResult is 0. If specified, firstResult should be set to any non-negative integer. | query | 0 |
resultsPerPage | Optional, defaults to 0, Used for pagination, the resultsPerPage query parameter specifies the maximum number of results returned by the ‘List All Sales Invoices’ service. The resultsPerPage parameter is relative to the firstResult parameter - therefore if firstResult is set to 0 and resultsPerPage is set to 10, then only the first 10 sales invoices from the overall list of sales invoices will be returned. If firstResult is set to 10 and resultsPerPage is set to 10, then the service will return the next 10 records (i.e the sales invoices at positions 10 to 19 in the complete list of sales invoices). The resultsPerPage parameter is optional. If no value is provided the service will return the entire result set - i.e. all sales invoices in the account. Valid values for resultsPerPage are any positive integer value, so any integer greater than or equal to 1. | query | |
state | Valid states are Draft, Due, Overdue, Settled and Written_Off, Used to filter the list of sales invoices returned by the state. The state query parameter can contain multiple states, and these states should be comma separated.As an example, if the state query parameter was specified as below: state=due,overdue The service would only return sales invoices that have been issued and not paid.If the state query parameter specified draft, then only invoices that have not been issued would be returned. | query | |
clientId | Optional, defaults to empty string | query | |
clientRef | Optional, defaults to empty string | query | |
dueDate | Optional, defaults to empty string | query | |
dueDateFrom | Optional, defaults to empty string | query | |
dueDateTo | Optional, defaults to empty string | query |
element: | media types: |
---|---|
salesInvoices | application/xml, application/json |
SalesInvoices or Errors
HTTP Status Code | Description |
---|---|
200 OK | SalesInvoices found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
RESTful service to create a sales invoice to the resource URL, i.e. performing a HTTP POST request to: http://
element: | media types: |
---|---|
salesInvoice | /, application/xml |
The sales invoice to add
element: | media types: |
---|---|
(custom) | application/xml, application/json |
SalesInvoice (with only the newly created SalesInvoice ID set) or Errors
HTTP Status Code | Description |
---|---|
201 Created | SalesInvoice added |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
Options call to handle CORS requests (typically coming from javascript frameworks like jQuery) See here for further information.
element: | media types: |
---|---|
(custom) | /, application/xml |
(no documentation provided)
Mount Point: /rest/v2/sales_invoices/{salesInvoiceId}
The following operations are supported on this resource:
RESTful service to retrieve all of the available sales invoice details for the sales invoice who’s ID is specified as the last element to the resource URL. e.g. performing a HTTP GET request to: http://
name | description | type | default |
---|---|---|---|
salesInvoiceId | Id of the requested sales invoice. | path |
element: | media types: |
---|---|
(custom) | application/xml, application/json |
SalesInvoice or Errors
HTTP Status Code | Description |
---|---|
200 OK | SalesInvoice found |
404 Not Found | SalesInvoice not found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
RESTful service to update a sales invoice to the resource URL, i.e. performing a HTTP PUT request to: http://
name | description | type | default |
---|---|---|---|
salesInvoiceId | The id of the sales invoice to be updated. | path |
element: | media types: |
---|---|
salesInvoice | /, application/xml |
The sales invoice to update
element: | media types: |
---|---|
(custom) | application/xml, application/json |
SalesInvoice (with only the updated SalesInvoice ID set) or Errors
HTTP Status Code | Description |
---|---|
201 Created | SalesInvoice updated |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
The salesInvoice/{salesInvoiceId} DELETE REST service end point deletes a specific sales invoice based on the ID specified
name | description | type | default |
---|---|---|---|
salesInvoiceId | The ID of the sales invoice to be deleted. | path |
element: | media types: |
---|---|
(custom) | application/xml, application/json |
empty body or Errors
HTTP Status Code | Description |
---|---|
204 No Content | SalesInvoice deleted |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
Mount Point: /rest/v2/sales_invoices/{salesInvoiceId}/{action}
RESTful service to issue or email a sales invoice, i.e. performing a HTTP PUT request to: http://
name | description | type | default |
---|---|---|---|
salesInvoiceId | The ID of the sales invoice to be emailed or issued. | path | |
action | Valid values are email and issue. | path |
element: | media types: |
---|---|
(custom) | application/xml, application/json |
empty body or Errors
HTTP Status Code | Description |
---|---|
204 No Content | SalesInvoice emailed |
204 No Content | SalesInvoice issued |
404 Not Found | SalesInvoice not found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
Mount Point: /rest/v2/sales_invoices/{salesInvoiceId}/document
RESTful service to retrieve all of the available sales invoice details for the sales invoice who’s ID is specified, including full document information (i.e. the pdf for that sales invoice).
name | description | type | default |
---|---|---|---|
salesInvoiceId | Get the document associated with the id of the sales invoice. | path |
element: | media types: |
---|---|
(custom) | application/xml, application/json |
SalesInvoice (with attached document) or Errors
HTTP Status Code | Description |
---|---|
200 OK | SalesInvoice (with document attached) found |
404 Not Found | SalesInvoice not found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |