Available delivery types
That webservice gives a list of delivery types allowed for the current cart.
It takes in account the shop preferencies and the presence of eBooks.
Even if the payment method “Payment at shop” is chosen, other delivery types than “Delivery in shop” will be shown.
Get available delivery types
That's how you get a token.
Example
https://wsmedia.tlsecure.com/api/json/00000/cart/information/deliveryType
Request
HTTP Verb : GET
URL : https://{WS_URL}/{returnType}/{domainCode}/cart/information/deliveryType
Parameters | Location | Type | Required | Default | Accepted |
|
---|---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
|
Response
Success
{
"response": {
"success": true
"code": 0
"message": "autorized delivery types retrieved"
"object": {
"deliveryTypes": {
"deliveryType": [4]
0: {
"id": 1
"name": "Delivery in shop"
"reserved": true
}
1: {
"id": 3
"name": "Fullfilment"
"reserved": true
}
2: {
"id": 4
"name": "Home delivery"
"reserved": true
}
3: {
"id": 5
"name": "Choice by librairy (all in MediaLog) "
"reserved": true
}
}
}
}
}
Error
{
"response": {
"success": false
"code": 10
"message": "cart not exist"
}
}
Codelist
Code | Success | Message |
---|---|---|
0 | v | autorized delivery types 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 |
99 |
| uncatched exception |