This method returns metadata for all invoices for a specified order.
HTTPS Verb/Method: |
GET |
URL Format: |
https:////server/api/invoices/{OrderID} |
Returns: |
Metadata for all invoices of the order will return upon a successful request. An error returns if the invoice metadata cannot be found. |
The following table lists the parameter available for this method request.
Parameter |
Description |
OrderID |
Enter the primary key (Orders.PriKey) of the requested MoversSuite order. |
Request Return
By default, metadata returns in JSON format as follows:
[{
"Amount": 1704.3600,
"Created": "2016-12-18T08:36:31",
"CreatedBy": "Judy Miles",
"Description": "Invoice: Z17340\/1",
"ImageUrl": "https://\/\/server\/api\/invoices\/43147\/1?download=true",
"InvoiceNumber": "U1900-12789/-6\/1",
"Invoiced": "2016-12-18T08:36:32",
"Name": " Z17340(1).pdf",
"OrderID": 43147,
"OrderUrl": "https://\/\/server\/api\/orders\/43147",
"Status": "Void",
"Type": "MS Invoice"
}, {… }]
NOTE |
The sequence of “\/” returned by JSON is an escape sequence for a single backslash “\”. In other words, each “\/” encountered is truly a single “\”. |
The following table describes the metadata returned by this method.
Property |
Description |
Amount |
The dollar amount of the invoice displays. |
Created |
Returned here is the creation date of the invoice document. This date is formatted in “CCYY-MM-DDThh:mm:ss” format (see Document API Date Format). |
CreatedBy |
The MoversSuite user that created the invoice is returned in this property. |
Description |
This is the text description of the invoice. |
ImageUrl |
The URL containing the location of the invoice document. If this value is null, then no image of the invoice is on file. |
InvoiceNumber |
The invoice identifier returns. This is the specific identifier for the invoice document. It is in the format of a single number, e.g. 23902, or in the format of the Order Number followed by “/”, and then invoice sequence, e.g. “U1900-12789-6/1.” Of note, JSON inserts a sequence of the forward slash “\” as an escape sequence, so the actual JSON invoice in this example is “U1900-12789-6\/1.” |
Invoiced |
The date and time of the invoice display within this property. This date is formatted in “CCYY-MM-DDThh:mm:ss” format (see Document API Date Format). |
Name |
The name of the document or the file name of the document is returned in this property. |
OrderID |
This is the identification for the order associated to the invoice. The OrderID is typically the primary key of the order in the Orders table (Order.PriKey). |
OrderUrl |
This property contains the URL that references the metadata for the order associated to the invoice. |
Status |
One of the following status values is returned with this property: “Invoice” indicates a an active, generated invoice “Void” indicates that the invoice has been voided “Draft” indicates that the invoice is in a draft state |
Type |
Invoices are always set to a type of “MS Invoice.” |