Order service
Methods that are linked to a customer’s order
ValidateOrder(order, customer, LoginInfo)
ValidateOrder is used to check the validity of the order contents before submitting it to the Harmoney system. Usually used to
check customer contact information, but can also be used to get valid order values for i.e. order total, fees etc.
This method checks and validates an Order object against Harmoney. Resulting Order object has delivery times, fees, discounts,
order total etc. assigned. By setting the field AddSaleTax to true will result in calculation of sale taxes on prices and fees.
ValidateOrder does not create a new order in Harmoney, therefore it does not receive an order id. This field will be empty
in the response. Some errors are handled on the Control page where customer services decided if the order will be accepted or rejected.
If the order gets stuck on the Control page, it will not receive an order id. It is therefore good to always check Order.ControlStatus
if the order is stuck on the Control page.
OBS Link to documents -> See also document WsPCL Getting started and WsPCL Terms of use.
Parameter |
Description |
order |
The Order object which is to be validated. Does not need to be a fully
completed object. Harmoney will validate the Order using the data provided,
and supply more information to the object when returned
See section Order |
customer |
The Customer object associated with the order. Order will be validated taking the
customer information into account (e.g. for discount).
Note: The customer is not mandatory for the order validation. You can
validate an order even if the customer is not yet identified (use Null as argument)
See section Customer |
LoginInfo |
See section LoginInfo |
SaveOrder(order, customer, LoginInfo)
This method saves order information to Harmoney. It is used both for initially saving an order and updating
an existing order. If not yet set (from order validation i.e.) resulting Order object has delivery times,
fees, discounts, order total etc. assigned.
OBS Link to documents -> See also document WsPCL Getting started and WsPCL Terms of use.
Parameter |
Description |
order |
The Order object which is to be validated. Does not need to be a fully
completed object. Harmoney will save the Order using the data provided, and supply
more information to the object when returned.
See section Order |
customer |
The Customer object associated with the order. Order will be saved taking the
customer information into account (e.g. for discount).
Note: The customer is not mandatory for the order validation. However,
it can only be Null if CustomerId is set in the Order-object
See section Customer |
LoginInfo |
See section LoginInfo |
Return value |
Comment |
A Order object, now saved to the Harmoney database |
See section Order |
DeleteOrder(customerId, orderId, LoginInfo)
This method deletes a saved order in Harmoney
Parameter |
Type |
Max length |
Description |
Example |
customerId |
string |
9 char |
The customer id that the order belongs to |
123124332 |
orderId |
string |
10 char |
The order id of the Harmoney order |
3453412334 |
LoginInfo |
object |
|
See section LoginInfo |
|
DeleteOrderRow(customerId, orderId, orderRowId, LoginInfo)
This method deletes a single order row from a saved order in Harmoney
Parameter |
Type |
Max length |
Description |
Example |
customerId |
string |
9 char |
The customer id that the order belongs to |
123124332 |
orderId |
string |
10 char |
The order id of the Harmoney order |
3453412334 |
orderRowId |
string |
3 char |
The order row id in Harmoney |
001 |
LoginInfo |
object |
|
See section LoginInfo |
|
GetSavedOrderFromId(orderId, customerId, LoginInfo)
This method returns an order from Harmoney that the customer previously has saved.
Parameter |
Type |
Max length |
Description |
Example |
orderId |
string |
10 char |
The order id in Harmoney |
3453412334 |
customerId |
string |
9 char |
The customer id that the order belongs to |
123124332 |
LoginInfo |
object |
|
See section LoginInfo |
|
GetSavedOrders(customerId, LoginInfo)
This method returns all orders that a customer has saved, both delivered and undelivered.
Note: This method only returns the order head, due to the potentially very large amount of data fetched from Harmoney.
Use GetSavedOrderFromId for each SavedOrder to get the full order details.
Parameter |
Type |
Max length |
Description |
Example |
customerId |
string |
9 char |
The customer id that the order belongs to |
123124332 |
LoginInfo |
object |
|
See section LoginInfo |
|
GetUndeliveredSavedOrders(customerId, LoginInfo)
This method returns a list of saved orders that has not yet been delivered.
Parameter |
Type |
Max length |
Description |
Example |
customerId |
string |
9 char |
The customer id that the order belongs to |
123124332 |
LoginInfo |
object |
|
See section LoginInfo |
|
GetSavedReceipts(customerId, LoginInfo)
This method returns a list of receipts.
Note: This method only returns the receipt head, due to the potentially very large amount of data fetched from Harmoney.
Use GetSavedReceiptFromId for each receipt to get the full receipt details.
Parameter |
Type |
Max length |
Description |
Example |
customerId |
string |
9 char |
The customer id that the receipt belongs to |
123124332 |
LoginInfo |
object |
|
See section LoginInfo |
|
GetSavedReceiptFromId(receiptId, LoginInfo)
This method returns a detailed receipt object.
Parameter |
Type |
Max length |
Description |
Example |
receiptId |
string |
22 char |
The receipt id in Harmoney |
1234567891234567891234 |
LoginInfo |
object |
|
See section LoginInfo |
|