REST Auth API: OrderLines
OrderLine resources are a subresource of Order, and represent individual invoice line items.
Each line has a description, quantity, amount, and references to account codes and any applicable tax. To help with auditing, each line can have a reference to the underlying billable item, such as a Registration on an event.
This resource supports retrieval of individual lines, retrieving collections of lines for an order, and creating or adding new lines to an order. Lines can be removed from an order via remove requests.
Common tasks
- Fetch an order line by ID (HTTP GET)
- Fetch an order line with link expansion (HTTP GET)
- List order lines for an order (HTTP GET)
- List order lines with link expansion (HTTP GET)
- Add an order line (HTTP POST)
- Remove an order line
OrderLine instance resource
Resource URI
/api/2012-02-01/auth/resources/orders/{OrderID}/lines/{OrderLineID}/
General structure
<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> <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>
Resource properties
| Property | Description |
|---|---|
| OrderLineID | An integer value that uniquely identifies this resource within the platform. |
| LineNumber | An integer value identifying the number of this line within the order. |
| Description | A text description for the line item. |
| UnitAmount |
The base amount for the item, supporting up to 4 decimal places of precision. This amount may be tax inclusive or exclusive depending on the LineAmountsTaxInclusive setting on the parent order.
|
| Quantity | The quantity multiplier for the line. |
| TaxAmount | The amount of tax for the line, rounded to 2 decimal places of precision. Omitted if the line has no associated tax. |
| LineAmount |
The total for the line, inclusive of any discount amount, rounded to 2 decimal places of precision. This amount may be tax inclusive or exclusive depending on the LineAmountsTaxInclusive setting on the parent order.
|
| AccountCode | The revenue or income account code for the line. |
| TaxAccountCode | The tax account code for the line. Omitted if the line has no associated tax. |
Related resource links
| Link (title) | Description |
|---|---|
| Order | The parent Order that owns this instance. |
| TaxRate | Reference to a TaxRate for the line. Omitted if the line has no tax. |
| Registration | Reference to the Registration resource this orderline is for. Included only if there is a registration associated with the line. |
| EventSessionRegistration | Reference to the Session Registration resource this orderline is for. Included only if there is a registration associated with the line. |
| Event | Reference to the Event this orderline is for. Included only if the line is associated with an event run privately for an organisation. |
HTTP GET
Returns a representation of a OrderLine, 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/11079/lines/7192/
<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> <TaxAmount>78.03</TaxAmount> <LineAmount>858.29</LineAmount> <AccountCode>GL15/200</AccountCode> <TaxAccountCode>GST10</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/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>
Example 2
Retrieve an OrderLine with link expansion for TaxRate, Registration, and nested Contact within the registration.
GET /api/2012-02-01/auth/resources/orders/11079/lines/7192/?expand=TaxRate,Registration,Registration/Contact
<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>
<TaxAmount>78.03</TaxAmount>
<LineAmount>858.29</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/TaxRate" type="application/xml" title="TaxRate" href="https://demo.arlo.co/api/2012-02-01/auth/resources/taxrates/9/">
<TaxRate>
<TaxRateID>9</TaxRateID>
<Name>GST (10%)</Name>
<RatePercent>10.00</RatePercent>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/taxrates/9/"/>
</TaxRate>
</Link>
<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/">
<Registration>
<RegistrationID>99230</RegistrationID>
<UniqueIdentifier>730dd1df-4a0c-4660-9267-51670807b843</UniqueIdentifier>
<Attendance>Attended</Attendance>
<Outcome>Pass</Outcome>
<Grade>A+ (92%)</Grade>
<Status>Approved</Status>
<CreatedDateTime>2015-09-28T22:42:13.95Z</CreatedDateTime>
<LastModifiedDateTime>2015-10-09T14:25:09.483Z</LastModifiedDateTime>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/registrations/99230/"/>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Event" type="application/xml" title="Event" href="https://demo.arlo.co/api/2012-02-01/auth/resources/events/176/"/>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Contact" type="application/xml" title="Contact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/872/">
<Contact>
<ContactID>872</ContactID>
<UniqueIdentifier>3bf2684c-7338-25e0-1fe3-bee57380224g</UniqueIdentifier>
<FirstName>Hannah</FirstName>
<LastName>Lane</LastName>
<Email>hannah.lane@example.org</Email>
<PhoneMobile>021 9876 54321</PhoneMobile>
<Status>Active</Status>
<CreatedDateTime>2015-08-15T10:30:22.411Z</CreatedDateTime>
<LastModifiedDateTime>2015-10-01T14:20:18.592Z</LastModifiedDateTime>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/872/"/>
</Contact>
</Link>
</Registration>
</Link>
</OrderLine>
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
To remove a line, see OrderLine RemoveRequests.
OrderLine collection resource
The OrderLine collection resource represents the collection of lines associated with an order.
The collection is returned as a set of Link elements which can be followed to access individual OrderLine resources, or link expansion can be used via the expand query parameter to inline the entities with the HTTP GET response.
Supports HTTP GET to retrieve lines, HTTP POST to add new lines, or RemoveRequests to delete lines.
Resource URI
/api/2012-02-01/auth/resources/orders/{OrderID}/lines/
HTTP GET
Returns a representation of the collection as a set of Link elements which can be followed to access individual OrderLine 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 OrderLine links with the default parameters, and no link expansion.
GET /api/2012-02-01/auth/resources/orders/266/lines
<OrderLines> <Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/472/" /> <Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/473/" /> <Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/474/" /> <Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/475/" /> <Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/476/" /> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/266/lines/" /> </OrderLines>
Example 2
Retrieve a collection of OrderLine links with the default parameters, with OrderLine, TaxRate, and Registration link expansion.
GET /api/2012-02-01/auth/resources/orders/261/lines?expand=OrderLine,OrderLine/TaxRate,OrderLine/Registration
<OrderLines>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/OrderLine" type="application/xml" title="OrderLine" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/261/lines/428/">
<OrderLine>
<OrderLineID>428</OrderLineID>
<LineNumber>1</LineNumber>
<Description>Test Course (TEST-001), 7-Jan-2027 8:00 AM, Test User</Description>
<UnitAmount>50.00</UnitAmount>
<Quantity>1.00</Quantity>
<TaxAmount>5.00</TaxAmount>
<LineAmount>55.00</LineAmount>
<AccountCode>200</AccountCode>
<TaxAccountCode>200</TaxAccountCode>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/261/lines/428/"/>
<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/261/"/>
<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/1294/">
<Registration>
<RegistrationID>1294</RegistrationID>
<UniqueIdentifier>a41e84fc-9452-36f1-2ab4-cd123efab789</UniqueIdentifier>
<Attendance>Attended</Attendance>
<Outcome>Pass</Outcome>
<Status>Approved</Status>
<CreatedDateTime>2026-12-15T09:20:11.322Z</CreatedDateTime>
<LastModifiedDateTime>2027-01-08T11:45:22.891Z</LastModifiedDateTime>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/registrations/1294/"/>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Event" type="application/xml" title="Event" href="https://demo.arlo.co/api/2012-02-01/auth/resources/events/1882/"/>
<Link rel="http://schemas.arlo.co/api/2012/02/auth/related/Contact" type="application/xml" title="Contact" href="https://demo.arlo.co/api/2012-02-01/auth/resources/contacts/456/"/>
</Registration>
</Link>
<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/3/">
<TaxRate>
<TaxRateID>3</TaxRateID>
<Name>GST (10%)</Name>
<RatePercent>10.00</RatePercent>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/taxrates/3/"/>
</TaxRate>
</Link>
</OrderLine>
</Link>
<Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/261/lines/?expand=OrderLine,OrderLine.TaxRate,OrderLine.Registration"/>
</OrderLines>
HTTP POST
Appends a basic line to the order (containing a description and amount), adding it at the end of the existing lines.
Limitations:
- Adding a line to the middle of the order is not currently supported.
- Adding a complex line associated with a registration or an event is not currently supported.
To allow a line to be appended, the order must meet the following criteria:
-
Have a OrderStatus of
AwaitingApproval,Pending, orExpired. - Have no existing payments or credits (only fully unpaid orders may be modified).
- Have no external integrations (such as having been exported Xero).
Attempting to add a new line to an order that does not support it will result in a 422 Unprocessable Entity response.
Required request elements
| Parameter | Description |
|---|---|
| Description | A text description for the line item. |
| UnitAmount |
The base amount for the item, supporting up to 4 decimal places of precision. This amount may be tax inclusive or exclusive depending on the LineAmountsTaxInclusive setting on the parent order.
|
| Quantity | The quantity multiplier for the line. |
Optional request elements
| Parameter | Description |
|---|---|
| AccountCode | The revenue or income account code for the line. |
| TaxAccountCode | The tax account code for the line. Omitted if the line has no tax. |
Optional request resource links
| Link (title) | Description |
|---|---|
| TaxRate | Reference to a TaxRate to use for the line. Tax amounts for the line will be automatically calculated. If not specified, no tax will be applied to the line. |
Unsupported request elements
The request may not include these read-only elements (managed or calculated by Arlo)
OrderLineIDLineNumberTaxAmountLineAmount
Unsupported request resource links
The request may not include these <Link> references:
OrderRegistrationEventSessionRegistrationEvent
Response
See HTTP response status codes for a general overview of all possible API status codes. Common response codes for POST operations are listed below.
| Status | Description |
|---|---|
| 201 Created | Resource was successfully created. The body of the response will contain the new resource. |
| 400 Bad Request | HTTP request body contains malformed or invalid parameters. |
| 422 Unprocessable Entity | HTTP request could not be processed due to semantic errors in the request body, such as invalid values or references, or an invalid order state that does not allow the addition of order lines. |
Example 1
Append a new OrderLine to order with ID 302, with basic details.
POST https://demo.arlo.co/api/2012-02-01/auth/resources/order/302/lines/ HTTP/1.1 Accept: application/xml Accept-Encoding: gzip, deflate Content-Type: application/xml Content-Length: 115 <OrderLine> <Description>T-shirt (size L)</Description> <UnitAmount>16.90</UnitAmount> <Quantity>1.00</Quantity> </OrderLine>
HTTP/1.1 201 Created Content-Length: 550 Content-Type: application/xml; charset=utf-8 <OrderLine> <OrderLineID>7199</OrderLineID> <LineNumber>6</LineNumber> <Description>T-shirt (size L)</Description> <UnitAmount>16.90</UnitAmount> <Quantity>1.00</Quantity> <LineAmount>16.90</LineAmount> <Link rel="self" type="application/xml" href="https://demo.arlo.co/api/2012-02-01/auth/resources/orders/302/lines/7199/"/> <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/"/> </OrderLine>
Example 2
Append a new OrderLine to order with ID 302, with an associated TaxRate reference and account codes.
POST https://demo.arlo.co/api/2012-02-01/auth/resources/order/302/lines/ HTTP/1.1 Accept: application/xml Accept-Encoding: gzip, deflate Content-Type: application/xml Content-Length: 420 <OrderLine> <Description>T-shirt (size L)</Description> <UnitAmount>16.90</UnitAmount> <Quantity>1.00</Quantity> <AccountCode>GL15/200</AccountCode> <TaxAccountCode>GST15</TaxAccountCode> <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/3/"/> </OrderLine>
HTTP/1.1 201 Created Content-Length: 810 Content-Type: application/xml; charset=utf-8 <OrderLine> <OrderLineID>7199</OrderLineID> <LineNumber>6</LineNumber> <Description>T-shirt (size L)</Description> <UnitAmount>16.90</UnitAmount> <Quantity>1.00</Quantity> <TaxAmount>2.54</TaxAmount> <LineAmount>19.44</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/7199/"/> <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/"/> </OrderLine>
HTTP PUT
Not supported.
HTTP DELETE
Not supported.
