Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

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

Available subresources:


Modifier

Languages

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

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

Modifier

Response

Success

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

Codelist

Code

Success

Message

0

v

languages retrieved

1

domaincode malformed

2

connexion error

99

uncatched exception


Modifier

Countries

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

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

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

Codelist

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.

More information about Address types >>

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

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

Codelist

Code

Success

Message

0

v

address types retrieved

1

domaincode malformed

2

connexion error

99

uncatched exception


Modifier

Interests

Displays a list of interests defined by the shop.

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

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

Error

{
	"response": {
		"success": false
		"code": 10
		"message": "no interests defined"
	}
}

Codelist

Code

Success

Message

0

v

interests retrieved

1

domaincode malformed

2

connexion error

10

no interests defined

99

uncatched exception


Modifier

Delivery types

Displays the delivery types allowed by the shop.

Reserved delivery types

The reserved parameter specifies whether or not the delivery type is a “system” one, with some particular functions.
Reserved delivery types are :

  • Delivery in shop (id: 1) - Can be chosen by the customer. He has to pick up his order in the shop that he will have to select. No shipping costs are applied.

  • Only eBooks (id: 2) - Can not be chosen by the customer. This delivery type will be used automatically if all products in the cart are eBooks. No shipping costs are applied.

  • FullFilment (id: 3) - Can not be chosen by the customer. It will be set during the ordering process, according to the shop's preferences concerning delivery and if the customer wants to be delivered at home.

  • At home (id: 4) - Can be chosen by the customer. This is the default “at home” delivery ; some other transporters/delivery companies could also be chosen (but these aren't reserved delivery types). However, if you give the choice to choose specific transporters/delivery companies, this default type shouldn't be given anymore.

  • Choice by library (id: 5) - Can not be chosen by the customer. With that parameter, every orders will get directly into Medialog. That choice is done with shop preferencies.

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

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

Error

{
	"response": {
		"success": false
		"code": 10
		"message": "no delivery types defined"
	}
}

Codelist

Code

Success

Message

0

v

delivery types retrieved

1

domaincode malformed

2

connexion error

10

no delivery types defined

99

uncatched exception


Modifier

Payment methods

Displays the payment methods allowed by the shop.

Reserved payment methods

The reserved parameter specifies whether or not the payment method is a “system” one, with some particular functions.
Reserved payment methods are :

  • Payment at shop (id: 1) - Can be chosen by the customer. The customer will pay at shop. Evidently, this payment method is only available in case of a delivery in shop.

  • Confirmed by shop (id: 2) - If you use this payment method, it's up to you to deal with the payment process, and then, to push the result to our services by the order status update.

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

-

Modifier

Response

Success

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

Error

{
	"response": {
		"success": false
		"code": 10
		"message": "no payment methods defined"
	}
}

Codelist

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.

The list contains all the types of Giftwraps the shop has defined (e.g.: New Year / Sinterklaas / Pasen / Birthday…).

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

Modifier

Response

Success

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

Error

{
	"response": {
		"success": true
		"code": 0
		"message": "no giftwraps defined"
	}
}

Codelist

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.

The list contains all shopof the domainCode

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

Modifier

Response

Success

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

Error

{
	"response": {
		"success": true
		"code": 0
		"message": "no shhop defined"
	}
}

Codelist

Code

Success

Message

0

v

shop retrieved

1

domaincode malformed

2

connexion error

10

no shop defined

99

uncatched exception

Modifier

Collection Points

Displays the collection point list.

The list contains all collection point of the domainCode.

Example

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

Modifier

Request

Parameters

Location

Type

Required

Default

Accepted

token

Header

String(26)

v

Modifier

Response

Success

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

Codelist

Code

Success

Message

0

v

get collection points

10

collection point not exist

99

uncatched exception

Modifier

Collection Point

Displays the collection point.

Example

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

Modifier

Response

Success

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

Codelist

Code

Success

Message

0

v

get collection point

10

collection point not exist

99

uncatched exception

  • No labels