REST Auth API: Orders
Order resources represent invoices issued by your platform. They document the purchase of one or more items (such as event registrations), including billing details, item lines with amounts, and any associated payments.
Line items are represented by OrderLines, along with an associated resource with details about any payments. Details of associated billing Contacts and Organisations are available as related resources.
Orders can follow a workflow of requiring approval before payment, so have a number of possible states including AwaitingApproval, Approved and Cancelled. Cancelled orders may have an associated CreditNote.
Order instance resource
Resource URI
/api/2012-02-01/auth/resources/Orders/{OrderID}/
General structure
<Order> <OrderID>302</OrderID> <UniqueIdentifier>22b3fab4-ef56-4d70-9ce0-a7cc3c1a26cd</UniqueIdentifier> <Code>ORD-302</Code> <ReferenceCode>Ref 128/12</ReferenceCode> <Date>2015-01-01</Date> <DueDate>2015-02-01</DueDate> <LineAmountsTaxInclusive>false</LineAmountsTaxInclusive> <ExpectedPaymentMethod>Account</ExpectedPaymentMethod> <SubTotal>1800.00</SubTotal> <TotalTax>225.00</TotalTax> <Total>2025.00</Total> <CurrencyCode>NZD</CurrencyCode> <ApprovedDateTime>2011-10-17T03:51:29.577Z</ApprovedDateTime> <MarkedAsInvoiceSentDateTime>2011-10-17T03:51:29.577Z</MarkedAsInvoiceSentDateTime> <MarkedAsPaidDateTime>2011-10-17T03:51:29.577Z</MarkedAsPaidDateTime> <Status>Approved</Status> <CreatedDateTime>2011-10-17T03:51:29.577Z</CreatedDateTime> <LastModifiedDateTime>2011-10-19T02:55:42.412Z</LastModifiedDateTime> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToContact" type="application/xml" title="BillToContact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/18220/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToOrganisation" type="application/xml" title="BillToOrganisation" href="https://demo.arlo.co/api/2012-02-01/auth/resources/organisations/99001/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillingAddress" type="application/xml" title="BillingAddress" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/billingaddress/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Region" type="application/xml" title="Region" href="https://demo.arlo.co/api/2012-02-01/auth/resources/regions/4/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Lines" type="application/xml" title="Lines" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/PaymentReferences" type="application/xml" title="PaymentReferences" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/paymentreferences/"/> </Order>
Resource properties
Property | Description |
---|---|
OrderID | An integer value that uniquely identifies this resource within the platform. |
UniqueIdentifier | A GUID value that uniquely identifies this resource across any platform. |
Code | A string representing a code of the order. |
ReferenceCode | A custom reference code (such as a purchase number), up to 256 characters. |
Date | The date of the order. |
DueDate | The due date of any payments for the order. |
LineAmountsTaxInclusive | Determines whether line amounts for the order are tax inclusive. |
ExpectedPaymentMethod | The expected payment method for the order, usually set when the order was created. This should be used for informational purposes only, and may differ to the actual payment method used for the order. |
SubTotal | The total of the order, excluding any tax amount. |
TotalTax | The total amount of tax for all lines on the order. |
Total | The total of the order, including tax. |
CurrencyCode | Three-letter alpha code of the currency the order has been created in. |
ApprovedDateTime | A UTC DateTime value indicating when the order was approved. Omitted if the order has not been approved. |
MarkedAsInvoiceSentDateTime | A UTC DateTime value indicating when an invoice for the order was recorded as sent. Omitted if no invoice has been sent. |
MarkedAsPaidDateTime | A UTC DateTime value indicating when the order was marked as fully paid. Omitted if the order has not been fully paid. |
CancelledDateTime | A UTC DateTime value indicating when the order was cancelled. Omitted if the order has not been cancelled. |
Status | An OrderStatus value representing the current state of this order, such as awaiting approval, expired, completed or cancelled. |
CreatedDateTime | A UTC DateTime value indicating when this resource was created. This value is read-only. |
LastModifiedDateTime | A UTC DateTime value indicating when this resource was last modified. This value is read-only. |
Related resource links
Link (title) | Description |
---|---|
BillToContact | Reference to a Contact resource that represents the billed individual for this order. NOTE: Orders billed to organisations will still have a billing contact. |
BillToOrganisation | Reference to a Organisation resource that represents the billed organisation for this order. Omitted if the order is to be billed to a private individual. |
BillingAddress | Reference to an Address resource that represents the billing address for this order. |
Region | Reference to a Region resource that represents the region of the order. |
Lines | Reference to an OrderLines resource that contains a collection of lines related to this order. |
PaymentReferences | Reference to a PaymentReferences resource that contains a collection of payments related to this order. |
HTTP GET
Returns a representation of an Order, including the properties and links above.
Optional parameters
Parameter | Description |
---|---|
expand | Expression referencing Link elements to expand when generating the response. See link expansion. |
Example 1
GET /api/2012-02-01/auth/resources/orders/302/
<Order> <OrderID>302</OrderID> <UniqueIdentifier>22b3fab4-ef56-4d70-9ce0-a7cc3c1a26cd</UniqueIdentifier> <Code>ORD-302</Code> <ReferenceCode>Ref 128/12</ReferenceCode> <Date>2015-01-01</Date> <DueDate>2015-02-01</DueDate> <LineAmountsTaxInclusive>false</LineAmountsTaxInclusive> <ExpectedPaymentMethod>Account</ExpectedPaymentMethod> <SubTotal>1800.00</SubTotal> <TotalTax>225.00</TotalTax> <Total>2025.00</Total> <CurrencyCode>NZD</CurrencyCode> <ApprovedDateTime>2011-10-17T03:51:29.577Z</ApprovedDateTime> <MarkedAsInvoiceSentDateTime>2011-10-17T03:51:29.577Z</MarkedAsInvoiceSentDateTime> <MarkedAsPaidDateTime>2011-10-17T03:51:29.577Z</MarkedAsPaidDateTime> <Status>Approved</Status> <CreatedDateTime>2011-10-17T03:51:29.577Z</CreatedDateTime> <LastModifiedDateTime>2011-10-19T02:55:42.412Z</LastModifiedDateTime> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToContact" type="application/xml" title="BillToContact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/18220/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToOrganisation" type="application/xml" title="BillToOrganisation" href="https://demo.arlo.co/api/2012-02-01/auth/resources/organisations/99001/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillingAddress" type="application/xml" title="BillingAddress" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/billingaddress/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Region" type="application/xml" title="Region" href="https://demo.arlo.co/api/2012-02-01/auth/resources/regions/4/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Lines" type="application/xml" title="Lines" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/PaymentReferences" type="application/xml" title="PaymentReferences" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/paymentreferences/"/> </Order>
Example 2
Retrieve a specific order, including expansion of line items.
GET /api/2012-02-01/auth/resources/orders/302/?expand=lines/orderline
<Order> <OrderID>302</OrderID> <UniqueIdentifier>22b3fab4-ef56-4d70-9ce0-a7cc3c1a26cd</UniqueIdentifier> <Code>ORD-302</Code> <ReferenceCode>Ref 128/12</ReferenceCode> <Date>2015-01-01</Date> <DueDate>2015-02-01</DueDate> <LineAmountsTaxInclusive>false</LineAmountsTaxInclusive> <ExpectedPaymentMethod>Account</ExpectedPaymentMethod> <SubTotal>1326.44</SubTotal> <TotalTax>198.96</TotalTax> <Total>1525.40</Total> <CurrencyCode>NZD</CurrencyCode> <ApprovedDateTime>2011-10-17T03:51:29.577Z</ApprovedDateTime> <MarkedAsInvoiceSentDateTime>2011-10-17T03:51:29.577Z</MarkedAsInvoiceSentDateTime> <MarkedAsPaidDateTime>2011-10-17T03:51:29.577Z</MarkedAsPaidDateTime> <Status>Approved</Status> <CreatedDateTime>2011-10-17T03:51:29.577Z</CreatedDateTime> <LastModifiedDateTime>2011-10-19T02:55:42.412Z</LastModifiedDateTime> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToContact" type="application/xml" title="BillToContact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/18220/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToOrganisation" type="application/xml" title="BillToOrganisation" href="https://demo.arlo.co/api/2012-02-01/auth/resources/organisations/99001/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillingAddress" type="application/xml" title="BillingAddress" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/billingaddress/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Region" type="application/xml" title="Region" href="https://demo.arlo.co/api/2012-02-01/auth/resources/regions/4/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Lines" type="application/xml" title="Lines" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/"> <OrderLines> <OrderLine> <OrderLineID>7192</OrderLineID> <LineNumber>1</LineNumber> <Description>Facilitation - The Art of Collaborative Leadership (ART-014), 9-Oct-2015 8:00 AM, Hannah Lane</Description> <UnitAmount>780.26</UnitAmount> <Quantity>1.00</Quantity> <DiscountAmount>-117.04</DiscountAmount> <TaxAmount>99.48</TaxAmount> <LineAmount>762.70</LineAmount> <AccountCode>GL15/200</AccountCode> <TaxAccountCode>GST15</TaxAccountCode> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/7192/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/TaxRate" type="application/xml" title="TaxRate" href="https://demo.arlo.co/api/2012-02-01/auth/resources/taxrates/9/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Registration" type="application/xml" title="Registration" href="https://demo.arlo.co/api/2012-02-01/auth/resources/registrations/99230/"/> </OrderLine> <OrderLine> <OrderLineID>7193</OrderLineID> <LineNumber>2</LineNumber> <Description>Facilitation - The Art of Collaborative Leadership (ART-014), 9-Oct-2015 8:00 AM, John Smith</Description> <UnitAmount>780.26</UnitAmount> <Quantity>1.00</Quantity> <TaxAmount>99.48</TaxAmount> <LineAmount>762.70</LineAmount> <AccountCode>GL15/200</AccountCode> <TaxAccountCode>GST15</TaxAccountCode> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/7193/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/TaxRate" type="application/xml" title="TaxRate" href="https://demo.arlo.co/api/2012-02-01/auth/resources/taxrates/9/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Registration" type="application/xml" title="Registration" href="https://demo.arlo.co/api/2012-02-01/auth/resources/registrations/99231/"/> </OrderLine> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/"/> <OrderLines> </Link> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/PaymentReferences" type="application/xml" title="PaymentReferences" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/paymentreferences/"/> </Order>
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
Not supported.
Order collection resource
The Order collection resource represents the set of Order resources on the platform.
Resource URI
/api/2012-02-01/auth/resources/orders/
HTTP GET
Returns a representation of the collection as a set of Link elements which can be followed to access individual
Order resources, or link expansion can be used via the expand
query parameter to inline the entities with the HTTP GET response. See querying collections for general information on handling resource collections.
Optional parameters
Parameter | Description |
---|---|
expand | Expression referencing Link elements to expand when generating the response. See link expansion. |
filter |
A filter expression to apply to the collection. See collection filters. The following
properties (and link titles) may be used in filter expressions:
|
orderby |
A sort expression to apply to the collection. See collection sorting. The following
properties may be used in sort expressions:
|
skip |
Returns a subset of records from the collection, starting at index N+1 specified by this parameter. The skip and top parameters are generally used for collection paging.
|
top |
Returns a subset of records from the collection, starting at index 0 or index skip , and returns the first N records. The skip and top parameters are generally used for collection paging.
|
Example 1
Retrieve a collection of Order links with the default parameters, and no link expansion.
GET /api/2012-02-01/auth/resources/orders/
<Orders> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/1/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/2/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/3/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/4/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/5/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/6/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/7/"/> ... <Link rel="next" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/?skip=100"/> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/"/> </Orders>
Example 2
Retrieve a collection of Order links with the default parameters, with Order
link expansion.
GET /api/2012-02-01/auth/resources/orders/?expand=Order
<Orders> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/9001/"> <Order> <OrderID>302</OrderID> <UniqueIdentifier>22b3fab4-ef56-4d70-9ce0-a7cc3c1a26cd</UniqueIdentifier> <Code>ORD-302</Code> <ReferenceCode>Ref 128/12</ReferenceCode> <Date>2015-01-01</Date> <DueDate>2015-02-01</DueDate> <LineAmountsTaxInclusive>false</LineAmountsTaxInclusive> <ExpectedPaymentMethod>Account</ExpectedPaymentMethod> <SubTotal>1800.00</SubTotal> <TotalTax>225.00</TotalTax> <Total>2025.00</Total> <CurrencyCode>NZD</CurrencyCode> <Status>Cancelled</Status> <CancelledDateTime>2011-10-17T03:51:29.577Z</CancelledDateTime> <CreatedDateTime>2011-10-17T03:51:29.577Z</CreatedDateTime> <LastModifiedDateTime>2011-10-19T02:55:42.412Z</LastModifiedDateTime> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToContact" type="application/xml" title="BillToContact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/18220/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillToOrganisation" type="application/xml" title="BillToOrganisation" href="https://demo.arlo.co/api/2012-02-01/auth/resources/organisations/99001/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/BillingAddress" type="application/xml" title="BillingAddress" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/billingaddress/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Region" type="application/xml" title="Region" href="https://demo.arlo.co/api/2012-02-01/auth/resources/regions/4/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Lines" type="application/xml" title="Lines" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/"/> <Link rel="http://schemas.arlo.co/api/2012/02/auth/related/PaymentReferences" type="application/xml" title="PaymentReferences" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/paymentreferences/"/> </Order> </Link> <Link rel="http://schemas.arlo.co/api/2012/02/auth/Order" type="application/xml" title="Order" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/9002/"> <Order> ... </Order> </Link> ... <Link rel="next" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/?expand=Order&skip=100"/> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/?expand=Order"/> </Orders>
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
Not supported.