Aurora API: Order Part Despatch
OrderPartDespatch
Using this controller you can add, update and retrieve all information related to a part dispatch. This includes updating attributes, statuses, addresses and all other part dispatch related values. You may also create empty PartDespatch IDs to later pass into the OrderPartDespatch Update method to assign ordered items to it.
Add
Deferred: No
Please note that the following setting needs to be unchecked in order for this API endpoint to work, otherwise a fatal error will be thrown: Aurora backend UI > Store > Settings > Aurora > Orders > Disable order splitting.
A number of validations are performed on the request:
- UnassignedPartOrderID cannot be specified when UnassignedItemDestination equals 'new'
- ItemID's must exist and must belong to the Order (OrderID)
- The supplied QuantityExpected must be the same as the original ordered item's product quantity
- The supplied ItemID's must NOT be already assigned to another Part Despatch
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Order>
<PartDespatch>
<Add send_confirmation="yes">
<OrderID>1</OrderID>
<PartOrderStatus>Dispatched (Courier)</PartOrderStatus>
<PartOrderNote>Custom note</PartOrderNote>
<PartOrderShippingSku>SKUEurope</PartOrderShippingSku>
<PartOrderShippingCost>80.00</PartOrderShippingCost>
<PartOrderShippingTax>20.00</PartOrderShippingTax>
<ShippingAddress>
<StorageType>P</StorageType>
<AddressType>ST</AddressType>
<EmailAddress>[email protected]</EmailAddress>
<OptOut>0</OptOut>
<Gender>male</Gender>
<CompanyName></CompanyName>
<FirstName>TEST</FirstName>
<LastName>API</LastName>
<AddressLine1>25</AddressLine1>
<AddressLine2>RINGWAY AVE</AddressLine2>
<Town>LEIGH</Town>
<County>LANCS</County>
<PostCode>WN7 1TX</PostCode>
<Country>United Kingdom</Country>
<PhoneNumber>0101010101</PhoneNumber>
<MobileNumber>0202020202</MobileNumber>
</ShippingAddress>
<CourierName>Royal Mail Airmail Letter</CourierName>
<TrackingNumber>12321412X</TrackingNumber>
<Items>
<Item>
<ItemID>2</ItemID>
<QuantityExpected>1</QuantityExpected>
</Item>
</Items>
<UnassignedItemDestination>existing</UnassignedItemDestination>
<UnassignedPartOrderID>123</UnassignedPartOrderID>
</Add>
</PartDespatch>
</Order>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<PartOrderID>1</PartOrderID>
<UnassignedPartOrderID>2</PartOrderID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
This section only covers a few of the unique request fields that are applicable only to this method. All other fields are described with the OrderGet method.
Field | Values | API Version | Description | Required |
---|---|---|---|---|
send_confirmation | 'yes' or 'no' | 1.5+ | This is an attribute on the top level method element (i.e. <Add send_confirmation="yes"> or <Update send_confirmation="no">) that can be used to send a status change email for the part dispatch. Default is 'yes'. | No |
OrderID | Integer | 1.5+ | This must be a valid Order ID. | Yes |
PartOrderStatus | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
PartOrderNote | String | 1.5+ | No | |
PartOrderShippingSku | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
PartOrderShippingTotalCost | Float | 1.5+ | Shipping Total Cost including VAT. Allows automatic calculation of PartOrderShippingTax and PartOrderShippingCost based on the Order.TaxRate | No (cannot be used in conjunction with PartOrderShippingTax or PartOrderShippingCost) |
PartOrderShippingCost | Float | 1.5+ | Shipping Cost (less the VAT see "PartOrderShippingTax" below ) The default value 0 or if this is the first part despatch the value of the Order.ShippingCost. Note: Order.ShippingCost is recalculated from the sum of PartOrderShippingCost associated to the order. | No (only if PartOrderShippingTax specified) |
PartOrderShippingTax | Float | 1.5+ | The tax payable on the shipping. The default value 0 or if this is the first part despatch the value of the Order.ShippingTax. Note: Order.ShippingTax is recalculated from the sum of PartOrderShippingTax associated to the order. | No (only if PartOrderShippingCost specified) |
ShippingAddress | Container | 1.5+ | This contains all of the fields pertaining to the part dispatch address. Option located at Backend > Store > Settings > Aurora > Orders > Enable part dispatch shipping address must be enabled for this to work. | No |
ShippingAddress.CustomerID | Integer | 1.5+ | The Internal ID Aurora uses to identify Users or Customers of the site. | No |
ShippingAddress.StorageType | P | 1.5+ | This describes whether an address is an Order Address, User/Customer Address, or a Part Despatch Address. For this action only 'P' is allowed | No |
ShippingAddress.AddressType | "ST" only | 1.5+ | Shipping Address (ST). | No |
ShippingAddress.EmailAddress | String | 1.5+ | No | |
ShippingAddress.OptOut | 1 or 0 | 1.5+ | Is used by some mailing and reporting systems to control whether or not the address is used in mail-shots and marketing campaigns. | No |
ShippingAddress.Gender | male or female | 1.5+ | No | |
ShippingAddress.CompanyName | String | 1.5+ | No | |
ShippingAddress.Title | Restricted String | 1.5+ | The is the User/Customer title, e.g. Mr, Mrs, etc. To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
ShippingAddress.FirstName | String | 1.5+ | No | |
ShippingAddress.LastName | String | 1.5+ | No | |
ShippingAddress.StoreReference | String | 1.5+ | The internal Store ID/Reference assigned to the store in the Aurora Back-end > Shipping > Stores section. This can be used in place of the customer address details where a product is to be a) shipped to the store for collection or b) no billing address is required as the payment was taken as cash in-store. | If present, the following fields should be omitted: AddressLine1, AddressLine2, Town, County, PostCode, Country |
ShippingAddress.AddressLine1 | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.AddressLine2 | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.Town | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.County | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.PostCode | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.Country | Restricted String | 1.5+ | Values permitted depend on "Country Name" from the defined country list in Aurora. See Aurora Backend > Shipping > Countries | This field should not be provided where a StoreReference is present. |
ShippingAddress.PhoneNumber | String | 1.5+ | No | |
ShippingAddress.MobileNumber | String | 1.5+ | No | |
CourierName | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
CourierCode | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd. If providing both CourierCode and CourierName, they must reference the same Courier setup within Aurora, if not an error will occur. | No |
TrackingNumber | String | 1.5+ | No | |
Items | Container | 1.5+ | No | |
Items.Item | Container | 1.5+ | No | |
Items.Item.ItemID | Integer | 1.5+ | Item must belong to OrderID | Yes |
Items.Item.QuantityExpected | Integer | 1.5+ | QuantityExpected must match exactly the quantity of the ordered item | Yes |
UnassignedItemDestination | String | 1.5+ | Only 'new' allowed for Add method | No |
Update
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Order>
<PartDespatch>
<Update send_confirmation="yes">
<PartOrderID>4</PartOrderID>
<PartOrderStatus>Dispatched (Courier)</PartOrderStatus>
<PartOrderNote>Custom note</PartOrderNote>
<PartOrderShippingSku>SKUEurope</PartOrderShippingSku>
<PartOrderShippingCost>80.00</PartOrderShippingCost>
<PartOrderShippingTax>20.00</PartOrderShippingTax>
<ShippingAddress>
<StorageType>P</StorageType>
<AddressType>ST</AddressType>
<EmailAddress>[email protected]</EmailAddress>
<OptOut>0</OptOut>
<Gender>male</Gender>
<CompanyName></CompanyName>
<FirstName>TEST</FirstName>
<LastName>API</LastName>
<AddressLine1>25</AddressLine1>
<AddressLine2>RINGWAY AVE</AddressLine2>
<Town>LEIGH</Town>
<County>LANCS</County>
<PostCode>WN7 1TX</PostCode>
<Country>United Kingdom</Country>
<PhoneNumber>0101010101</PhoneNumber>
<MobileNumber>0202020202</MobileNumber>
</ShippingAddress>
<CourierName>Royal Mail Airmail Letter</CourierName>
<TrackingNumber>12321412X</TrackingNumber>
<Items>
<Item>
<ItemID>2</ItemID>
<QuantityExpected>1</QuantityExpected>
</Item>
</Items>
<UnassignedItemDestination>existing</UnassignedItemDestination>
<UnassignedPartOrderID>123</UnassignedPartOrderID>
</Update>
</PartDespatch>
</Order>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<PartOrderID>4</PartOrderID>
<UnassignedPartOrderID>123</PartOrderID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
This section only covers a few of the unique request fields that are applicable only to this method. All other fields are described with the OrderGet method.
Field | Values | API Version | Description | Required |
---|---|---|---|---|
send_confirmation | 'yes' or 'no' | 1.5+ | This is an attribute on the top level method element (i.e. <Add send_confirmation="yes"> or <Update send_confirmation="no">) that can be used to send a status change email for the part despatch. Default is 'yes'. | No |
PartOrderID | Integer | 1.5+ | This must be a valid Order ID. | Yes |
PartOrderStatus | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
PartOrderNote | String | 1.5+ | No | |
PartOrderShippingSku | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
PartOrderShippingTotalCost | Float | 1.5+ | Shipping Total Cost including VAT. Allows automatic calculation of PartOrderShippingTax and PartOrderShippingCost based on the Order.TaxRate | No (cannot be used in conjunction with PartOrderShippingTax or PartOrderShippingCost) |
PartOrderShippingCost | Float | 1.5+ | Shipping Cost (less the VAT see "PartOrderShippingTax" below ). The value is unchanged if omitted. Note: Order.ShippingCost is recalculated from the sum of PartOrderShippingCost associated to the order. | No (only if PartOrderShippingTax specified) |
PartOrderShippingTax | Float | 1.5+ | The tax payable on the shipping. The value is unchanged if omitted. Note: Order.ShippingTax is recalculated from the sum of PartOrderShippingTax associated to the order. | No (only if PartOrderShippingCost specified) |
ShippingAddress | Container | 1.5+ | This contains all of the fields pertaining to the part dispatch address. Option located at Backend > Store > Settings > Aurora > Orders > Enable part dispatch shipping address must be enabled for this to work. | No |
ShippingAddress.CustomerID | Integer | 1.5+ | The Internal ID Aurora uses to identify Users or Customers of the site. | No |
ShippingAddress.StorageType | P | 1.5+ | This describes whether an address is an Order Address, User/Customer Address, or a Part Despatch Address. For this action only 'P' is allowed | No |
ShippingAddress.AddressType | "ST" only | 1.5+ | Shipping Address (ST). | No |
ShippingAddress.EmailAddress | String | 1.5+ | No | |
ShippingAddress.OptOut | 1 or 0 | 1.5+ | Is used by some mailing and reporting systems to control whether or not the address is used in mail-shots and marketing campaigns. | No |
ShippingAddress.Gender | male or female | 1.5+ | No | |
ShippingAddress.CompanyName | String | 1.5+ | No | |
ShippingAddress.Title | Restricted String | 1.5+ | The is the User/Customer title, e.g. Mr, Mrs, etc. To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
ShippingAddress.FirstName | String | 1.5+ | No | |
ShippingAddress.LastName | String | 1.5+ | No | |
ShippingAddress.StoreReference | String | 1.5+ | The internal Store ID/Reference assigned to the store in the Aurora Back-end > Shipping > Stores section. This can be used in place of the customer address details where a product is to be a) shipped to the store for collection or b) no billing address is required as the payment was taken as cash in-store. | If present, the following fields should be omitted: AddressLine1, AddressLine2, Town, County, PostCode, Country |
ShippingAddress.AddressLine1 | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.AddressLine2 | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.Town | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.County | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.PostCode | String | 1.5+ | This field should not be provided where a StoreReference is present. | |
ShippingAddress.Country | Restricted String | 1.5+ | Values permitted depend on "Country Name" from the defined country list in Aurora. See Aurora Backend > Shipping > Countries | This field should not be provided where a StoreReference is present. |
ShippingAddress.PhoneNumber | String | 1.5+ | No | |
ShippingAddress.MobileNumber | String | 1.5+ | No | |
ShippingAddress.AddressID | Integer | 1.5+ | If this fields is supplied, it should be an AddressID that is already assigned to the part dispatch being updated, which will lead to the underlying address record to be updated with the supplied fields. If AddressID is omitted, a new address record will be created and associated with the part dispatch. | No |
CourierName | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | No |
CourierCode | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd. If providing both CourierCode and CourierName, they must reference the same Courier setup within Aurora, if not an error will occur. | No |
TrackingNumber | String | 1.5+ | No | |
Items | Container | 1.5+ | No | |
Items.Item | Container | 1.5+ | No | |
Items.Item.ItemID | Integer | 1.5+ | Item must belong to OrderID | Yes |
Items.Item.QuantityExpected | Integer | 1.5+ | QuantityExpected must match exactly the quantity of the ordered item | Yes |
UnassignedItemDestination | 'new' or 'existing' | 1.5+ | No | |
UnassignedPartOrderID | Integer | 1.5+ | Must be a valid PartOrderID | Required if UnassignedItemDestination = 'existing' |
Get
Deferred: Conditional
This method is deferred if requests are made without a limit or paging applied.
Part Orders returned by this call are currently always ordered by the date they were placed. This may change, so you should consider specifying the sort order of your results if this is going to effect your systems performance in the future.
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Order>
<PartDespatch>
<Get tracking="automatic|none">
<PartOrderID>1</PartOrderID>
<Limit>100</Limit>
<Paging>
<Limit>20</Limit>
<Page>1</Page>
</Paging>
</Get>
</PartDespatch>
</Order>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="UTF-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<PartOrderDespatch>
<OrderID>12345678</OrderID>
<PartOrderID>8</PartOrderID>
<PartOrderStatus>Default status</PartOrderStatus>
<PartOrderNote>Some note</PartOrderNote>
<CourierName>Courier name</CourierName>
<CourierCode>CCODE</CourierCode>
<TrackingNumber>1234567890</TrackingNumber>
<ShippingDate>2017-05-30 00:00:00</ShippingDate>
<PartOrderShippingSku>XXZSTD</PartOrderShippingSku>
<PartOrderShippingCost>80.00</PartOrderShippingCost>
<PartOrderShippingTax>20.00</PartOrderShippingTax>
<ShippingAddress>
<AddressID>1</AddressID>
<CustomerID>0</CustomerID>
<StorageType>I</StorageType>
<AddressType>ST</AddressType>
<EmailAddress>[email protected]</EmailAddress>
<OptOut>0</OptOut>
<Gender>female</Gender>
<CompanyName>Company name</CompanyName>
<Title>Miss</Title>
<FirstName>Customer</FirstName>
<LastName>ABID-2026619</LastName>
<AddressLine1>1 BILLING Road</AddressLine1>
<AddressLine2>Sunshine View</AddressLine2>
<Town>Pixyland</Town>
<County>Lakeside</County>
<PostCode>AB1 2CD</PostCode>
<Country>Some country</Country>
<PhoneNumber>2739128</PhoneNumber>
<MobileNumber>15022455</MobileNumber>
</ShippingAddress>
<CalculatedPaymentTotal>159.97</CalculatedPaymentTotal>
<PaymentTaken />
<Items>
<Item>
<ItemID>2549875</ItemID>
<Quantity>1</Quantity>
</Item>
<Item>
<ItemID>2549877</ItemID>
<Quantity>2</Quantity>
</Item>
</Items>
</PartOrderDespatch>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
tracking | none or automatic | 1.5+ | This is an attribute on the top level method element (i.e. ) that can be used to enable tracking of order part dispatches, which enabled for later filtering by the field Tracking. | No |
Tracking | sent or unsent | 1.5+ | Tracking filters are based on tracking information either automatically set by previous calls to the OrderPartDespatch Get API (i.e. when using tracking="automatic"). sent will return orders that have previously been marked as sent relative to the order modified date unsent will return orders that have not previously been marked as sent relative to the order modified date | No |
OrderID | Integer | 1.5+ | A valid Order ID. | At least one of the three fields must be present |
PartOrderID | Integer | 1.5+ | A valid PartDespatch ID. | |
PartOrderStatus | Restricted String | 1.5+ | To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd | |
Limit | Integer > 0 | 1.5+ | A field allowing the client to limit the total number of items fetched form the database. The integer must be divisible by the Paging.Limit if Paging is specified. | |
Paging | Container | 1.5+ | No | |
Paging.Token | String | 1.5+ | This is the Token string issued from any previous OrderGet call featuring paging. Providing this will have the API collect the data from the previously generated set of data, ensuring accurate and consistent dataset results for every page. You cannot change the request properties previously provided when using a Token, so these are ignored by the API. | No |
Paging.Limit | Integer > 0 | 1.5+ | The number of results to return in the page being requested | No |
Paging.Page | Integer > 0 | 1.5+ | The page number to return the results for | Only if 'Token' is provided |
Updated about 2 years ago