...
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Status update
This service update the order status, and lead it through the ordering process.
...
HTTP Verb : PUT
URL : http://{WS_URL}/api/{returnType}/{domainCode}/admin/order/{order}/status
Parameters | Location | Type | Required | Default | Accepted | |
---|---|---|---|---|---|---|
token | Header | String(26) | v | Must be the SYSTEM user | ||
Content-Type | Header | String | v | application/x-www-form-urlencoded | ||
order | Path | Long | v | |||
status | Form | Int | v | |||
message | Form | String | Some information to be logged (ex. payment confirmation by the provider) |
Response
Success
Code Block |
---|
{ "response": { "success": true "code": 0 "message": "order has ben set to status confirmerd" "object": { "order": { "id": 3 "customer": 2 "price": 22.5 "totalPrice": 22.5 "status": 2 "creationDate": "2016-02-29 15:43:21" "deliveryType": 3 "paymentMethod": 1 "lines": { "line": [1] 0: { "id": 7 "ean": 9789462500877 "title": "Kip" "author": "Marcus Bean & Ellen Hosmar" "price": 22.5 "quantity": 1 "productForm": "BB" } } "deliveryFirstName": "Thor" "deliveryLastName": "-" "deliveryAdressLine1": "-" "deliveryPostcode": "-" "deliveryCity": "Asgard" "deliveryCountry": 1 "invoiceFirstName": "Thor" "invoiceLastName": "-" "invoiceAdressLine1": "-" "invoicePostcode": "-" "invoiceCity": "Asgard" "invoiceCountry": 1 } } } } |
...
Code Block |
---|
{ "response": { "success": false "code": 12 "message": "status not exist" } } |
Codelist
Code | Success | Message |
---|---|---|
0 | v | order has ben set to status X |
1 | domaincode malformed | |
2 | connexion error | |
3 | token empty | |
4 | no token with that key | |
5 | invalid token | |
9 | {param} not {type} {(or undefined)} | |
10 | order not exist | |
11 | not an order but still a cart | |
12 | status not exist | |
13 | order already confirmed | |
99 | uncatched exception |
Get orders list
Example
https://wsmedia.tlsecure.com/api/json/00000/customer/order
Request
HTTP Verb : GET
URL : https://{WS_URL}/{returnType}/{domainCode}/customer/order
Parameters | Location | Type | Required | Default | Accepted | |
---|---|---|---|---|---|---|
token | Header | String(26) | v |
Response
Success
Code Block |
---|
{ "response": { "success": true "code": 0 "message": "get orders" "object": { "orders": { "order": [1] 0: { "id": 5 "customer": 10 "price": 51.44 "shipping": 0 "totalPrice": 51.44 "status": 1 "creationDate": "2016-03-10 13:45:20" "deliveryType": 4 "paymentMethod": 2 "lines": { "line": [3] 0: { "id": 3 "ean": 9789025762186 "title": "Kaatje Kip" "author": "Axel Scheffler & Bette Westera" "price": 8.95 "quantity": 1 "productForm": "BB" } 1: { "id": 4 "ean": 9789021560571 "title": "Gouden Kip" "author": "Diana Henry & Laura Edwards & Hilde Smeesters" "price": 19.99 "quantity": 1 "productForm": "BB" } 2: { "id": 5 "ean": 9789462500877 "title": "Kip" "author": "Marcus Bean & Ellen Hosmar" "price": 22.5 "quantity": 1 "productForm": "BB" } } "deliveryFirstName": "Uncle" "deliveryLastName": "Ben" "deliveryAddressLine1": "Ingram St." "deliveryNumber": 20 "deliveryPostcode": "11375" "deliveryCity": "NY (Queens)" "deliveryCountry": 231 "invoiceFirstName": "Peter" "invoiceLastName": "Parker" "invoiceAddressLine1": "Ingram St." "invoiceNumber": 20 "invoicePostcode": "11375" "invoiceCity": "NY (Queens)" "invoiceCountry": 231 } } } } } |
...
Code Block |
---|
{ "response": { "success": false "code": 10 "message": "no orders" } } |
Codelist
Code | Success | Message |
---|---|---|
0 | v | get orders |
1 | domaincode malformed | |
2 | connexion error | |
3 | token empty | |
4 | no token with that key | |
5 | invalid token | |
9 | {param} not {type} {(or undefined)} | |
10 | no orders | |
99 | uncatched exception |
...
Get order
Example
https://wsmedia.tlsecure.com/api/json/00000/customer/order/5
Request
HTTP Verb : GET
URL : https://{WS_URL}/{returnType}/{domainCode}/customer/order/{order}
Parameters | Location | Type | Required | Default | Accepted | |
---|---|---|---|---|---|---|
token | Header | String(26) | v | |||
order | Path | long | v |
Response
Success
Code Block |
---|
{ "response": { "success": true "code": 0 "message": "get order" "object": { "order": { "id": 5 "customer": 10 "price": 104.87 "shipping": 0 "totalPrice": 113.82 "status": 3 "creationDate": "2016-03-10 13:45:20" "deliveryType": 4 "paymentMethod": 2 "lines": { "line": [3] 0: { "id": 164 "ean": 9789462082977 "title": "Adolf Loos Architectuur En Al Het Andere " "author": "Ineke Van Der Burg" "price": 24.95 "quantity": 1 "productForm": "ED" "giftwrap": 1 } 1: { "id": 116 "ean": 9789021560571 "title": "Gouden Kip" "author": "Diana Henry & Laura Edwards & Hilde Smeesters" "price": 19.99 "quantity": 3 "productForm": "BB" } 2: { "id": 166 "ean": 9789044629354 "title": "Gij nu" "author": "Griet Op de Beeck" "price": 19.95 "quantity": 1 "productForm": "BB" "giftwrap": 1 } } "packages": { "package": [3] 0: { "id":21 "processType": 1 "deliveryType": 2 "status": 4 "lines": [1] 0: { "id": 164 "ean": 9789462082977 "title": "Adolf Loos Architectuur En Al Het Andere " "author": "Ineke Van Der Burg" "price": 24.95 "quantity": 1 "productForm": "ED" "giftwrap": 1 } } 1: { "id":22 "processType": 2 "deliveryType": 4 "status": 4 "carrier": 1 "carrierPackageId": 648 "tracking": "321084351546850" "trackingLink": "http://www.sendcloud.nl/tracking/321084351546850" "lines": [2] 0: { "id": 116 "ean": 9789021560571 "title": "Gouden Kip" "author": "Diana Henry & Laura Edwards & Hilde Smeesters" "price": 19.99 "quantity": 3 "productForm": "BB" "cancels": { "cancel": [1] 0: { "quantity": 1 "date": "2016-03-11 11:38:44" } } "returns": { "return": [1] 0: { "quantity": 1 "date": "2016-04-20 13:27:03" } } "quantityThatMayBeReturned":1 } 1: { "id": 167 "ean": 9789025762186 "title": "Kaatje Kip" "author": "Axel Scheffler & Bette Westera" "price": 8.95 "quantity": 1 "productForm": "BB" "quantityThatMayBeReturned":1 } } 2: { "id":23 "processType": 3 "deliveryType": 4 "status": 0 "lines": [1] 0: { "id": 166 "ean": 9789044629354 "title": "Gij nu" "author": "Griet Op de Beeck" "price": 19.95 "quantity": 1 "productForm": "BB" "giftwrap": 1 "quantityThatMayBeCancelled":1 } } } "deliveryFirstName": "Uncle" "deliveryLastName": "Ben" "deliveryAddressLine1": "Ingram St." "deliveryNumber": 20 "deliveryPostcode": "11375" "deliveryCity": "NY (Queens)" "deliveryCountry": 231 "invoiceFirstName": "Peter" "invoiceLastName": "Parker" "invoiceAddressLine1": "Ingram St." "invoiceNumber": 20 "invoicePostcode": "11375" "invoiceCity": "NY (Queens)" "invoiceCountry": 231 } } } } |
...
Code Block |
---|
{ "response": { "success": false "code": 10 "message": "order not exist" } } |
Codelist
Code | Success | Message |
---|---|---|
0 | v | get order |
1 | domaincode malformed | |
2 | connexion error | |
3 | token empty | |
4 | no token with that key | |
5 | invalid token | |
9 | {param} not {type} {(or undefined)} | |
10 | order not exist | |
99 | uncatched exception |
Apply a voucher
Example
https://wsmedia.tlsecure.com/api/json/00000/cartVoucher
Request
HTTP Verb : PUT
URL : https://{WS_URL}/{returnType}/{domainCode}/cartVoucher
Parameters | Location | Type | Required | Default | Accepted | |
---|---|---|---|---|---|---|
token | Header | String(26) | v | |||
voucherCode | Form param | String | v | |||
orderId | Form param | Int | v |
As soon as you use a voucher in your basket, you will notice new nodes:
...
Code Block |
---|
{ "response": { "success": false "code": 10 "message": "voucher code is not valid" } } |
Codelist
Code | Success | Message |
---|---|---|
0 | v | voucher code is valid |
10 | voucher code is not valid | |
11 | there is already a code used for this order | |
12 | voucher code already used | |
13 | error on update order | |
14 | order does not exist | |
15 | discount too big for the order |
Order status
Set Order.status (OS) | Package.status (PS) | orderline_to_package.status (OPS) |
5 Confirmed | 0 = Confirmed | 0 = Confirmed |
|
|
|
7 Processing (via BO) | 1 = Processing (via BO, CB FullFilment ONT) | 10 = Processing (via BO) |
|
| 14 = Supplier Order (via ML) |
|
| 16 = Partial recieved (via ML) |
|
| 18 = Not available (via ML) |
|
|
|
|
|
|
8 Processed (via BO) | 2 = Processed (via BO) | 20 = Ready to ship (via BO) |
8 Processed (via BO) | 2 = Processed (via BO) | 22 = Ready to collect (via BO) |
|
|
|
10 Done (via BO) -> 8 Processed ? | 3 = Sent to customer (Via BO, CB fulfilment UIT, Veloyd or SendCloud) | 30 = Shipped (CB fulfilment UIT) |
|
|
|
10 Done (via BO) | 4 = recieved by customer (Via BO, Veloyd or SendCloud) | 40 = Recieved by customer (via eBook link generation) |
|
|
|
| 5 = Unknown | 50 = Unknown |
|
|
|
99 Cancelled (via BO, ML) | 99 = Cancelled (via SendCloud, Veloyd, BO, ML) | 99 = Cancelled (via BO, ML) |
98 Error | no change | no change |
| 98 Error (via SendCloud, Veloyd, CB FullFilment ONT) |
|
|
| 98 Error (CB FullFilment NUIT) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Veloyd mapping
Package.type=homedelivery |
|
|
|
Veloyd Status | Package.Status |
1 REGISTERED | 2 processed |
2 CONFIRMED | 2 processed |
3 COLLECTED | 3 Sent to customer |
4 IN TRANSIT | 3 Sent to customer |
5 MANCO | 98 Error |
6 AT PICKUP POINT | 4 Recieved by customer |
7 DELIVERED | 4 Recieved by customer |
8 RETURNED TO SENDER | 5 Unknown |
9 CANCELLED | 99 Cancelled |
eBooks mapping
Package.type = Digital, eBooks Fulfilment |
|
|
|
| orderline_to_package |
preorder | OPS.Status = 1 Processing |
URL ok | OPS.Status = 40 Recieved by customer |
Error | OPS.status = 98 Error |