/
Orders

Orders

Get orders list

Example

https://wsmedia.tlsecure.com/api/json/00000/customer/order

Request

Parameters

Location

Type

Required

Default

Accepted

 

Parameters

Location

Type

Required

Default

Accepted

 

token

Header

String(26)

v

 

 

 

Response

Success

{ "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

{ "response": { "success": false "code": 10 "message": "no orders" } }

Codelist

Code

Success

Message

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

Parameters

Location

Type

Required

Default

Accepted

 

Parameters

Location

Type

Required

Default

Accepted

 

token

Header

String(26)

v

 

 

 

order

Path

long

v

 

 

 

Response

Success

{ "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

Codelist

Code

Success

Message

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

Parameters

Location

Type

Required

Default

Accepted

 

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

Voucher type: Selection

Reduction on order line level. Eligible for each ean of a selection.

Response

Success

Voucher type: User

Reduction on the total order amount. It works with a connected user.

Response

Success

Voucher type: Author

Reduction on order line level. Eligible for each ean having the corresponding author.

Response

Success

Voucher type: ProductForm

Reduction on the total order amount.

Response

Success

Error

Codelist

Code

Success

Message

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

Related content