Arlo

REST Auth API: OrderLine RemoveRequests

RemoveRequest resources are a subresource of OrderLine, and represent requests to remove a line from an order and optionally cancel any associated registrations.

This resource supports submitting remove requests via HTTP POST.

RemoveRequest collection resource

Resource URI

/api/2012-02-01/auth/resources/orders/{OrderID}/lines/{OrderLineID}/removerequests/

General structure

<RemoveRequest>
  <CancelRegistration>true</CancelRegistration>
</RemoveRequest>

Resource properties

Property Description
CancelRegistration A boolean value to determine whether any associated registrations should be cancelled during the removal of the line. Optional. Default is true if not specified. If the line being removed has no associated registration, this property will be ignored.

HTTP GET

Not supported.

HTTP POST

Removes a line from an order and optionally cancels any associated registrations.

To allow a line to be removed, the order must meet the following criteria:

  • Have a OrderStatus of AwaitingApproval, Pending, or Expired.
  • Have no existing payments or credits (only fully unpaid orders may be modified).
  • Have no external integrations (such as having been exported to Xero).

Attempting to remove a line from an order that does not support it will result in a 422 Unprocessable Entity response.

Optional request elements
Parameter Description
CancelRegistration A boolean value to determine whether any associated registrations should be cancelled during the removal of the line. Default is true if not specified. If the line being removed has no associated registration, this property will be ignored.
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
204 No Content Resource was successfully removed.
400 Bad Request HTTP request body contains malformed or invalid parameters.
404 Not Found The specified order or order line could not be found.
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 removal of order lines.
Example 1

Submit a standard remove request for order line with ID 5913 on order with ID 491, cancelling any associated registrations (default behaviour).

POST https://demo.arlo.co/api/2012-02-01/auth/resources/orders/491/lines/5913/removerequests/ HTTP/1.1
Accept: application/xml
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 16

<RemoveRequest />
HTTP/1.1 204 No Content
Example 2

Submit a remove request for order line with ID 5913 on order with ID 491, with an explicit option to preserve (not cancel) any associated registrations.

POST https://demo.arlo.co/api/2012-02-01/auth/resources/orders/491/lines/5913/removerequests/ HTTP/1.1
Accept: application/xml
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 64

<RemoveRequest>
  <CancelRegistration>false</CancelRegistration>
</RemoveRequest>
HTTP/1.1 204 No Content

HTTP PUT

Not supported.

HTTP DELETE

Not supported.