POST api/v1/OrderEdit
Update certain values of an order after it has been placed. Orders already in the warehouse are not changeable
Order must be locked before calling
Any value passed as null will be ignored and NOT updated
Request Information
URI Parameters
None.
Body Parameters
OrderEditParamsName | Description | Type | Additional information |
---|---|---|---|
apiKey |
Please contact Caliq support to get your key |
string |
Required |
LockID | integer |
Required |
|
CustomerID |
Caliq internal unique customer identifier. Must be supplied if AccountNo is omitted |
integer |
None. |
AccountNo |
User entered unique customer account number. Must be supplied if CustomerID is omitted |
string |
Required Max length: 10 |
EventID |
Caliq internal id of event to be edited |
integer |
Required |
CustomerPONumber |
Customer's purchase order number - send null to leave as is |
string |
Max length: 20 |
OrderNotes |
User entered notes to be shown on despatch paperwork. Send null to leave as is' |
string |
None. |
DeliveryRequirement |
(A)sap, on (D)ate, (W)eek commencing - send null to leave unchanged |
string |
Max length: 1 |
DeliveryRequirementDate |
If DeliveryRequirement is D or W this is the date in YYYYMMDD format |
string |
None. |
DespatchMethodID |
Must be a valid method id. Send as null to leave as is |
integer |
None. |
Carriage |
Total carriage ex VAT. Send null to leave unchanged |
decimal number |
None. |
CustomerHold |
Place on customer hold. If true will be placed on hold otherwise no change |
boolean |
None. |
EditDeliveryAddress |
Only required if needing to edit address data |
EditDeliveryAddress |
None. |
OrderEditLines |
List of order line changes |
OrderEditLines |
None. |
Request Formats
application/json, text/json
{ "apiKey": "sample string 1", "LockID": 2, "CustomerID": 1, "AccountNo": "sample string 3", "EventID": 1, "CustomerPONumber": "sample string 4", "OrderNotes": "sample string 5", "DeliveryRequirement": "sample string 6", "DeliveryRequirementDate": "sample string 7", "DespatchMethodID": 8, "Carriage": 1.0, "CustomerHold": true, "EditDeliveryAddress": { "DeliveryAddressID": 1, "DirectDelivery": true, "DeliveryCompany": "sample string 3", "Line1": "sample string 4", "Line2": "sample string 5", "Line3": "sample string 6", "Town": "sample string 7", "County": "sample string 8", "Postcode": "sample string 9", "Country": "sample string 10", "Firstname": "sample string 11", "Surname": "sample string 12", "Email": "sample string 13", "Phone": "sample string 14" }, "OrderEditLines": { "OrderEditLine": [ { "LineID": 1, "ProductID": 1, "ProductCode": "sample string 1", "Quantity": 1, "UnitPrice": 1.0 }, { "LineID": 1, "ProductID": 1, "ProductCode": "sample string 1", "Quantity": 1, "UnitPrice": 1.0 } ] } }
application/xml, text/xml
<OrderEditParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <apiKey>sample string 1</apiKey> <LockID>2</LockID> <CustomerID>1</CustomerID> <AccountNo>sample string 3</AccountNo> <EventID>1</EventID> <CustomerPONumber>sample string 4</CustomerPONumber> <OrderNotes>sample string 5</OrderNotes> <DeliveryRequirement>sample string 6</DeliveryRequirement> <DeliveryRequirementDate>sample string 7</DeliveryRequirementDate> <DespatchMethodID>8</DespatchMethodID> <Carriage>1</Carriage> <CustomerHold>true</CustomerHold> <EditDeliveryAddress> <DeliveryAddressID>1</DeliveryAddressID> <DirectDelivery>true</DirectDelivery> <DeliveryCompany>sample string 3</DeliveryCompany> <Line1>sample string 4</Line1> <Line2>sample string 5</Line2> <Line3>sample string 6</Line3> <Town>sample string 7</Town> <County>sample string 8</County> <Postcode>sample string 9</Postcode> <Country>sample string 10</Country> <Firstname>sample string 11</Firstname> <Surname>sample string 12</Surname> <Email>sample string 13</Email> <Phone>sample string 14</Phone> </EditDeliveryAddress> <OrderEditLines> <OrderEditLine> <LineID>1</LineID> <ProductID>1</ProductID> <ProductCode>sample string 1</ProductCode> <Quantity>1</Quantity> <UnitPrice>1</UnitPrice> </OrderEditLine> <OrderEditLine> <LineID>1</LineID> <ProductID>1</ProductID> <ProductCode>sample string 1</ProductCode> <Quantity>1</Quantity> <UnitPrice>1</UnitPrice> </OrderEditLine> </OrderEditLines> </OrderEditParams>
Response Information
Resource Description
Returns:
200 OK Returns whether update was successful or not
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
503 Service Unavailable
Name | Description | Type | Additional information |
---|---|---|---|
OrderEditData | OrderEditData |
None. |
Response Formats
application/json, text/json
{ "OrderEditData": { "OK": true, "OrderEditIssues": [ { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" }, { "ID": 1, "Message": "sample string 2", "ExtraData": "sample string 3" } ] } }
application/xml, text/xml
<OrderEditResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OrderEditData> <OK>true</OK> <OrderEditIssues> <OrderEditIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </OrderEditIssue> <OrderEditIssue> <ID>1</ID> <Message>sample string 2</Message> <ExtraData>sample string 3</ExtraData> </OrderEditIssue> </OrderEditIssues> </OrderEditData> </OrderEditResults>