Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

The shopping cart is list of the products that a customer want to buy.

When he's ready to pay, he confirm that buying intention by converting that cart into an order. Doing so, his cart becomes empty, and the order is created.

Modifier

...

Get cart

Retrieve the cart of the user logged in.

...

https://wsmedia.tlsecure.com/api/json/00000/cart/Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

...

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "cart retrieved"
		"object": {
		"cart": {
				"customer": 586
				"productsQuantity": 1
				"price": 22.5
				"totalPrice": 22.5
				"creationDate": "2016-03-03 11:39:45"
				"deliveryType": 1
				"paymentMethod": 1
				"lines": {
					"line": [1]
						0:  {
							"id": 2
							"ean": 9789462500877
							"title": "Kip"
							"author": "Marcus Bean & Ellen Hosmar"
							"price": 22.5
							"quantity": 1
							"productForm": "BB"
						}
				}
				"deliveryAddress": {
					"id": 3
					"user": 586
					"addressType": 1
					"firstName": "Spider"
					"lastName": "Man"
					"adressLine1": "Victoria Street"
					"number": 44
					"postcode": "10025"
					"city": "New York"
					"country": 3
					"default": false
				}
				"invoiceAddress": {
					"id": 3
					"user": 586
					"addressType": 1
					"firstName": "Spider"
					"lastName": "Man"
					"adressLine1": "Victoria Street"
					"number": 44
					"postcode": "10025"
					"city": "New York"
					"country": 3
					"default": false
				}
			}
		}
	}
}

...

Code

Success

Message

0

v

retrieving cart

1

Domain code missing or malformed

2

Required field empty

3

Required field malformed

4

There is not session with this token

10

no cart at this time

...

...

Check cart

That service allows you tho check whether or not a cart is valid.

...

https://wsmedia.tlsecure.com/api/json/00000/cart/checkModifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

Modifier

Response

Success

Code Block
{
	"response": {
	"success": true
	"code": 0
	"message": "valid cart"
		"object": {
			"cart": {
				"customer": 586
				"price": 22.5
				"totalPrice": 22.5
				"creationDate": "2016-03-03 11:39:45"
				"deliveryType": 1
				"paymentMethod": 1
				"lines": {
					"line": [1]
						0:  {
							"id": 2
							"ean": 9789462500877
							"title": "Kip"
							"author": "Marcus Bean & Ellen Hosmar"
							"price": 22.5
							"quantity": 1
							"productForm": "BB"
						}
				}
				"deliveryAddress": {
					"id": 3
					"user": 586
					"addressType": 1
					"firstName": "Spider"
					"lastName": "Man"
					"adressLine1": "Victoria Street"
					"number": 44
					"postcode": "10025"
					"city": "New York"
					"country": 3
					"default": false
				}
				"invoiceAddress": {
					"id": 3
					"user": 586
					"addressType": 1
					"firstName": "Spider"
					"lastName": "Man"
					"adressLine1": "Victoria Street"
					"number": 44
					"postcode": "10025"
					"city": "New York"
					"country": 3
					"default": false
				}
			}
		}
	}
}

...

Code

Success

Message

0

v

cart is valid

1

Domain code missing or malformed

2

Required field empty

3

Required field malformed

4

There is not session with this token

10

cart does not exist

11

cart already became an order

12

cart contains no products

13

cart error - does not belong to shop

14

cart belongs to a unregistred user while no email address has been given

15

facturation address not set

16

facturation address does not exist

17

delivery type not set

18

delivery type does not exist / is not defined

19

delivery address not set

20

facturation address does not exist

21

delivery in shop set while no shop has been selected

22

shop to be delivered in not exist

23

payment method not set

24

payment method does not exist / is not defined

25

payment in shop must have delivery in shop

99

Uncatched exception

Modifier

...

Confirm cart

Cart confirmation put an end to the cart, and create a “pending” order out of it.

...

https://wsmedia.tlsecure.com/api/json/00000/cart/confirm

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

Content-Type

Header

String

v

application/x-www-form-urlencoded

...

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "order saved"
		"object": {
			"order": {
				"id": 3
				"customer": 2
				"price": 22.5
				"totalPrice": 22.5
				"status": 1
				"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

Success

Message

0

v

order saved

1

Domain code missing or malformed

2

Required field empty

3

Required field malformed

4

There is not session with this token

10

cart does not exist

11

cart already became an order

12

cart contains no products

13

cart error - does not belong to shop

14

cart belongs to a unregistred user while no email address has been given

15

facturation address not set

16

facturation address does not exist

17

delivery type not set

18

delivery type does not exist / is not defined

19

delivery address not set

20

facturation address does not exist

21

delivery in shop set while no shop has been selected

22

payment method not set

23

payment method does not exist / is not defined

99

Uncatched exception

Modifier

...

Cart lines

Click here for more information.Modifier

...

Informations

Click here for more information.

...

...

Giftwrap

Click here for more information.Modifier

...

Discount

Click here for more information.