Description
We use this method to calculate the order in real time against the business rules defined in the ERP system. Extra orderlines can be returned, for example service fees, shipping costs and/or administrative fees.
Action
http://shoxl.com/ShoxlService/CalculateOrder
Please note: this is not a working url, but a combination of namespace and method. Do not expect the url to return a result.
Style
Document
The input of this method is the document element tns:CalculateOrder having the structure defined by the following table.
Description
The CalculateOrderRequest contains all the information needed to calculate the
Order in the ERP system.
A orderline Request contains all the information needed to calculate.
The output of this method is the document element tns:CalculateOrderResponse having the structure defined by the following table.
Description
The CalculateOrderResult contains the update order line information from the
ERP system.
URL: /Shoxl/v1/CalculateOrder Method: POST
The vatCode field on OrderLine is replaced by a new taxPercentage field
A new field "context" is introduced in the request body. When configured this object contains key value pairs (e.g. divisionCode).
Request body:
}
}
Response body:
}
}
Types:
Parameter | Type | |
---|---|---|
Type | Values |
---|---|
Element
Type
Occurs
Description
Sequence
1..1
request
tns:CalculateOrderRequest
0..1
Component
Type
Occurs
Description
Sequence
1..1
AccountNumber
s:string
1..1
This is the (project) account number of the customer.
ExternalOrderNumber
s:string
1..1
This the Shoxl Shop unique order number
OrderLines
tns:ArrayOfOrderLineRequest
0..1
A list of order lines. The order needs to be calculated for.
ShipmentMethodCode
s:int
1..1
A Shipment Method Code: 0 = pickup by customer, 1 = default delivery
Component
Type
Occurs
Description
Sequence
1..1
OrderLine
tns:OrderLineRequest
0..*
Component
Type
Occurs
Description
Sequence
1..1
IsExternal
s:boolean
1..1
If the order line is added by the ERP system (for example when its an extra fee or shipping costs), this field must be set true. If Shoxl Shop adds an order line this field is set false.
ProductNumber
s:string
1..1
The product number for the requested product details, this can be a customer-specific product number
Quantity
s:int
1..1
The amount of products ordered
BaseUnit
s:string
0..1
The unit to be used for getting the correct price
Element
Type
Occurs
Description
Sequence
1..1
CalculateOrderResult
tns:CalculateOrderResult
0..1
Component
Type
Occurs
Description
Sequence
1..1
ErrorCode
s:string
0..1
An error code returned by the ERP system
ErrorDescription
s:string
0..1
The error description related to the error code returned by the ERP system
OrderLines
tns:ArrayOfOrderLine
0..1
The calculated orderlines.
TotalAmount
s:int
1..1
The total amount of items in the order
TotalDiscountExclVat
s:decimal
1..1
The total amount of discount excluding VAT
TotalPriceExclVat
s:decimal
1..1
The total price of the order excluding VAT
TotalPriceInclVat
s:decimal
1..1
The total price of the order including VAT
TotalVat
s:decimal
1..1
The total amount of VAT
accountNumber
string required
This is the (project) account number of the customer.
externalOrderNumber
string
This the Shoxl Shop unique order number
orderLines
[OrderLineRequest]
The order needs to be calculated for.
shipmentMethodCode
integer($int32)
A Shipment Method Code: 0 = pickup by customer, 1 = default delivery
shippingCountry
string
The country where the order is shipped to. Must be a two-letter ISO country code.
context
object
A generic object designed to hold key-value pairs for the purpose of providing customer-specific fields.
parameter
type
isExternal
boolean
productNumber
string required
quantity
integer($int32)
baseUnit
string
errorCode
string nullable: true
errorDescription
string nullable: true
orderLines
[OrderLine]
totalAmount
integer($int32)
totalDiscountExclVat
number($double) nullable: true
totalPriceExclVat
number($double) nullable: true
totalPriceInclVat
number($double) nullable: true
totalVat
number($double) nullable: true
baseUnit
string nullable: true
carrier
string nullable: true
discountAmountExclVat
number($double) nullable: true
discountDescription
string nullable: true
discountPercentage
number($double) nullable: true
grossPriceExclVat
number($double) nullable: true
isExternal
boolean
nettoPriceExclVat
number($double) nullable: true
nettoPriceInclVat
number($double) nullable: true
orderLineStatus
integer($int32)
priceUnit
number($double)
productDescription
string nullable: true
productNumber
string nullable: true
quantity
number($double)
remainingQuantity
number($double)
subTotalPriceExclVat
number($double) nullable: true
subTotalPriceInclVat
number($double) nullable: true
trackAndTraceReference
string nullable: true
taxPercentage
number($double) nullable: true
type
integer($int32)
relatedProductNumber
string nullable: true
Type
None = 0
Product = 1
Shipping = 2
Payment = 3
Other = 4
Discount = 5
DisposalFee = 6