Shipping costs simulation
That webservice simulates the shipping costs for a given delivery country.
As it only simulates, nothing is applied.
Get simulation
Example
https://wsmedia.tlsecure.com/api/json/00000/cart/shipping?country=249
Request
HTTP Verb : GET
URL : https://{WS_URL}/{returnType}/{domainCode}/cart/shipping
Parameters | Location | Type | Required | Default | Accepted |
|
---|---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
|
country | Query | Integer | v |
|
| |
postCode | Query | String |
|
|
|
|
If the cart is emty, or only contains ebooks, an error is thrown. See below for more details.
This webservice simulates the shipping costs for a Home Delivery, so with a deliveryType 4.
Response
Success
{
"response": {
"success": true,
"code": 0,
"message": "cart retrieved",
"object": {
"cart": {
"id": 1251,
"customer": 586
"productsQuantity": 1
"price": 22.5
"shipping": 29.99
"totalPrice": 52.49
"creationDate": "2016-03-03 11:39:45"
"deliveryType": 4
"lines": {
"line": [1]
0: {
"id": 2
"ean": 9789462500877
"title": "Kip"
"author": "Marcus Bean & Ellen Hosmar"
"price": 22.5
"quantity": 1
"productForm": "BB"
}
}
"deliveryAddress": {
"country": 249,
"default": false
}
}
}
}
}
Error
{
"response": {
"success": false
"code": 10
"message": "cart not exist"
}
}
Codelist
Code | Success | Message |
---|---|---|
0 | v | cart retrieved |
1 |
| domaincode malformed |
2 |
| connexion error |
3 |
| token is empty |
4 |
| no token with that key |
5 |
| invalid token |
9 |
| {param} is not {type} {(or undefined)} |
10 |
| cart not exist |
11 |
| country not exist |
12 |
| cart empty |
13 |
| cart with only ebooks, no shipping cost |
99 |
| uncatched exception |