Versions Compared

Key

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

Shop

The Shop resource displays information about how the shop is configured.

By making GET requests to the subresources you can retrieve the different values a subresource can have.
E.g. A GET request to https://wsmedia.tlsecure.com/api/json/00000/shop/deliveryType will show which Delivery types are allowed by the shop

...

Table of Contents

...

minLevel

...

Modifier

1

...

Address types

...

Interests

...

Delivery types

...

Payment methods

...

Giftwrap

...

Shop

...

Collection Points

...

Collection Point

maxLevel2

...

Languages

Displays the languages supported by the shop. A customer may be stored with his language, but that's not required.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/language

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

Modifier

Response

Success

Code Block
{
	"response": {
	"success": true
	"code": 0
	"message": "languages retrieved"
	"object": {
		"languages": {
			"language": [2]
				0:  {
					"id": 1
					"code": "FR"
				}
				1:  {
					"id": 2
					"code": "NL"
				}
			}
		}
	}
}

...

Code

Success

Message

0

v

languages retrieved

1

domaincode malformed

2

connexion error

99

uncatched exception

...

...

Countries

Displays the countries supported by the shop. Countries are used for addresses and delivery.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/country

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "countries retrieved"
		"object": {
			"countries": {
				"country": [3]
					0:  {
						"id": 1
						"code": "BE"
					}
					1:  {
						"id": 2
						"code": "NL"
					}
					2:  {
						"id": 3
						"code": "LU"
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

countries retrieved

1

domaincode malformed

2

connexion error

99

uncatched exception

Modifier

...

Address types

Displays the Address types supported by the shop.
Address types sort the customer's addresses in two groups : delivery and invoice. At least one of each address type usually has to be configured.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/addressType

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

...

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "address types retrieved"
		"object": {
			"adressTypes": {
				"addressType": [2]
					0:  {
						"id": 1
						"type": "Delivery"
					}
					1:  {
						"id": 2
						"type": "Invoice"
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

address types retrieved

1

domaincode malformed

2

connexion error

99

uncatched exception

...

...

Interests

Displays a list of interests defined by the shop.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/interestModifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

...

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "interests retrieved"
		"object": {
			"interests": {
				"interest": [4]
					0:  {
						"id": 1
						"name": "Health"
					}
					1:  {
						"id": 2
						"name": "Literature"
					}
					2:  {
						"id": 3
						"name": "Languages"
					}
					3:  {
						"id": 4
						"name": "Sciences"
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

interests retrieved

1

domaincode malformed

2

connexion error

10

no interests defined

99

uncatched exception

...

...

Delivery types

Displays the delivery types allowed by the shop.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/deliveryType

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

...

Response

Success

Code Block
{
	"response": {
		"success": true
		"code": 0
		"message": "delivery types retrieved"
		"object": {
			"deliveryTypes": {
				"deliveryType": [5]
					0:  {
						"id": 1
						"name": "Delivery in shop"
						"reserved": true
						"authorizedByShop": true
					}
					1:  {
						"id": 2
						"name": "No delivery (only eBooks)"
						"reserved": true
						"authorizedByShop": true
					}
					2:  {
						"id": 3
						"name": "Fullfilment"
						"reserved": true
						"authorizedByShop": true
					}
					3:  {
						"id": 4
						"name": "Home delivery"
						"reserved": true
						"authorizedByShop": true
					}
					4:  {
						"id": 5
						"name": "Choice by librairy (all in MediaLog)"
						"reserved": true
						"authorizedByShop": true
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

delivery types retrieved

1

domaincode malformed

2

connexion error

10

no delivery types defined

99

uncatched exception

...

...

Payment methods

Displays the payment methods allowed by the shop.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/paymentMethod

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

Code Block
{
	"response": {
		"success": true
		"message": "payment methods retrieved"
		"object": {
			"paymentMethods": {
				"paymentMethod": [2]
				0:  {
						"id": 1
						"name": "Payement at shop"
						"reserved": true
						"authorizedByShop": true
					}
					1:  {
						"id": 2
						"name": "Confirmed by shop"
						"reserved": true
						"authorizedByShop": true
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

payment methods retrieved

1

domaincode malformed

2

connexion error

10

no payment methods defined

99

uncatched exception

Modifier

...

Giftwrap

Displays the giftwrap list.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/giftwrap

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

...

Response

Success

Code Block
{
	"response": {
		"success": false
		"code": 10
		"message": "giftwraps retrieved"
		"object": {
			"giftwraps": {
				"giftwrap": [1]
					0:  {
						"id": 4
						"name": "gift"
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

giftwraps retrieved

1

domaincode malformed

2

connexion error

10

no giftwraps defined

99

uncatched exception

Modifier

Shop

Displays the shop list.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/shop

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

Modifier

Response

Success

Code Block
{
	"response": {
		"success": false
		"code": 10
		"message": "giftwraps retrieved"
		"object": {
			"shops": {
				"shop": [1]
					0:  {
					"id": 9,
                                        "name": "XXXTournai",
                                        "addressLine1": "XXXX",
                                        "postcode": "XXXX",
                                        "city": "Tournai",
                                        "country": 2,
                                        "phone": "XXX",
                                        "email": "XXXXX"
					}
			}
		}
	}
}

...

Code

Success

Message

0

v

shop retrieved

1

domaincode malformed

2

connexion error

10

no shop defined

99

uncatched exception

...

Collection Points

Displays the collection point list.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/collectionPointModifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

...

Response

Success

Code Block
{
    "response": {
        "success": true,
        "code": 0,
        "message": "get collection points",
        "object": {
            "collectionPoints": {
                "collectionPoint": [
                    {
                        "id": 22,
                        "name": "test",
                        "number": 32,
                        "addressLine1": "rue de courtrai",
                        "postCode": "7700",
                        "city": "mouscron",
                        "country": 1,
                        "collectionPointType": {
                            "id": 16,
                            "type": "test",
                            "cost": 3.0
                        },
                        "collectionPointOpeningHours": {
                            "collectionPointOpeningHour": [
                                {
                                    "id": 103,
                                    "day": 1,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                },
                                {
                                    "id": 106,
                                    "day": 2,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                },
                                {
                                    "id": 109,
                                    "day": 3,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                },
                                {
                                    "id": 112,
                                    "day": 4,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                },
                                {
                                    "id": 115,
                                    "day": 5,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                },
                                {
                                    "id": 118,
                                    "day": 6,
                                    "from": "08:00:00",
                                    "to": "17:00:00",
                                    "fkCollectionPoint": 22
                                }
                            ]
                        },
                        "active": true
                    }
                ]
            }
        }
    }
}

...

Code

Success

Message

0

v

get collection points

10

collection point not exist

99

uncatched exception

Modifier

Collection Point

Displays the collection point.

...

https://wsmedia.tlsecure.com/api/json/00000/shop/collectionPoint/0

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

id

Path

Integer

...

Response

Success

Code Block
{
    "response": {
        "success": true,
        "code": 0,
        "message": "get collection point",
        "object": {
            "collectionPoint": {
                "id": 22,
                "name": "test",
                "number": 32,
                "addressLine1": "rue de courtrai",
                "postCode": "7700",
                "city": "mouscron",
                "country": 1,
                "collectionPointType": {
                    "id": 16,
                    "type": "test",
                    "cost": 3.0
                },
                "collectionPointOpeningHours": {
                    "collectionPointOpeningHour": [
                        {
                            "id": 103,
                            "day": 1,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        },
                        {
                            "id": 106,
                            "day": 2,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        },
                        {
                            "id": 109,
                            "day": 3,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        },
                        {
                            "id": 112,
                            "day": 4,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        },
                        {
                            "id": 115,
                            "day": 5,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        },
                        {
                            "id": 118,
                            "day": 6,
                            "from": "08:00:00",
                            "to": "17:00:00",
                            "fkCollectionPoint": 22
                        }
                    ]
                },
                "active": true
            }
        }
    }
}

...