...
Table of Contents | ||||
---|---|---|---|---|
|
|
...
Status update
This service update the order status, and lead it through the ordering process.
...
https://wsmedia.tlsecure.com/api/json/00000/admin/order/1/statusModifier
Request
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
}
}
}
}
} |
Error
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
}
}
}
} |
Error
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:
priceFull (price without the “discount”)
voucherCode
voucher (voucher id)
discount
percentage (visible only if the voucher is a percentage reduction)
For voucher type of ean, selection, author and productType the new nodes will be visible on the orderline level as well.
Voucher type: Ean
Reduction on order line level. A voucher eligible for an ean.
Response
Success
Code Block |
---|
{
"response": {
"success": true,
"code": 0,
"message": "voucher code is valid",
"object": {
"cart": {
"id": 58128,
"customer": 5393280,
"productsQuantity": 2,
"price": 35.99,
"priceFull": 40.99,
"voucherCode": "DAVE04",
"voucher": 199,
"totalPrice": 35.99,
"status": 0,
"creationDate": "2022-06-02 14:15:52",
"lines": {
"line": [
{
"id": 126889,
"ean": 9789400406865,
"title": "Troje",
"author": "Stephen Fry",
"price": 20.99,
"quantity": 1,
"productForm": "BC",
"voucher": 199,
"voucherCode": "DAVE04",
"priceFull": 25.99,
"discount": 5,
"dbs": 40,
"dbp": 40
},
{
"id": 126890,
"ean": 9789463821261,
"title": "Een winter vol verhalen",
"author": "Frits Abrahams & Robert Alberdingk Thijm & Maarten Asscher & Abdelkader Benali & Merijn de Boer & Jan Brokken & Peter Buwalda & Jeroen Brouwers & Thera Coppens & Adriaan van Dis & Jessica Durlacher & Maarten 't Hart & Wim Hazeu & Maria Heiden & Bas Heijne",
"price": 15,
"quantity": 1,
"productForm": "BB",
"dbs": 40,
"dbp": 40
}
]
},
"isSchoolBook": true
}
}
}
} |
Voucher type: Selection
Reduction on order line level. Eligible for each ean of a selection.
Response
Success
Code Block |
---|
{
"response": {
"success": true,
"code": 0,
"message": "voucher code is valid",
"object": {
"cart": {
"id": 58125,
"customer": 5393229,
"productsQuantity": 1,
"price": 11.99,
"priceFull": 16.99,
"voucherCode": "DAVE04",
"voucher": 199,
"totalPrice": 11.99,
"status": 0,
"creationDate": "2022-05-30 14:51:26",
"lines": {
"line": [
{
"id": 126855,
"ean": 9789000366095,
"title": "Er hangt een geheim in de lucht",
"author": "Anna Ruhe",
"price": 11.99,
"quantity": 1,
"productForm": "BB",
"voucher": 199,
"voucherCode": "DAVE04",
"priceFull": 16.99,
"discount": 5,
"dbs": 40,
"dbp": 40
}
]
}
}
}
}
} |
Voucher type: User
Reduction on the total order amount. It works with a connected user.
Response
Success
Code Block |
---|
{
"response": {
"success": true,
"code": 0,
"message": "voucher code is valid",
"object": {
"cart": {
"id": 58127,
"customer": 5389662,
"productsQuantity": 1,
"price": 11.99,
"priceFull": 16.99,
"reduction": 5,
"voucherCode": "DAVE04",
"voucher": 199,
"shipping": 0,
"totalPrice": 11.99,
"status": 0,
"creationDate": "2022-06-01 17:08:30",
"lines": {
"line": [
{
"id": 126858,
"ean": 9789000366095,
"title": "Er hangt een geheim in de lucht",
"author": "Anna Ruhe",
"price": 16.99,
"quantity": 1,
"productForm": "BB",
"dbs": 40,
"dbp": 40
}
]
}
}
}
}
} |
Voucher type: Author
Reduction on order line level. Eligible for each ean having the corresponding author.
Response
Success
Code Block |
---|
{
"response": {
"success": true,
"code": 0,
"message": "voucher code is valid",
"object": {
"cart": {
"id": 58125,
"customer": 5393229,
"productsQuantity": 1,
"price": 11.99,
"priceFull": 16.99,
"voucherCode": "DAVE04",
"voucher": 199,
"shipping": 0,
"totalPrice": 11.99,
"status": 0,
"creationDate": "2022-05-30 14:51:26",
"lines": {
"line": [
{
"id": 126855,
"ean": 9789000366095,
"title": "Er hangt een geheim in de lucht",
"author": "Anna Ruhe",
"price": 11.99,
"quantity": 1,
"productForm": "BB",
"voucher": 199,
"voucherCode": "DAVE04",
"priceFull": 16.99,
"discount": 5,
"dbs": 40,
"dbp": 40
}
]
}
}
}
}
} |
Voucher type: ProductForm
Reduction on the total order amount.
Response
Success
Code Block |
---|
{
"response": {
"success": true,
"code": 0,
"message": "voucher code is valid",
"object": {
"cart": {
"id": 58127,
"customer": 5389662,
"productsQuantity": 1,
"price": 11.99,
"priceFull": 16.99,
"reduction": 5,
"voucherCode": "DAVE04",
"voucher": 199,
"totalPrice": 11.99,
"status": 0,
"creationDate": "2022-06-01 17:08:30",
"lines": {
"line": [
{
"id": 126858,
"ean": 9789000366095,
"title": "Er hangt een geheim in de lucht",
"author": "Anna Ruhe",
"price": 16.99,
"quantity": 1,
"productForm": "BB",
"dbs": 40,
"dbp": 40
}
]
}
}
}
}
} |
Error
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 |