Second Hand
SearchEngine
In order to only view the second hand catalog in a search engine query, you have to add a restriction on the DBS catalog with the syntax “(AND DBS:xxxxx)". At the other hand if you want to exclude the second-hand catalog you would use the syntax "(AND NOT DBS:xxxxx)".
“DBS” number is your second hand catalog number.
How to make a search engine request:
Add second hand product to shopping cart
The Web Service to add an item to the shopping cart remains the same, except that a "secondHandFictif" field has been added. This field will take as value the Medialog’s EAN. To find this EAN, there are two possibilities: either by using the Web Service “infoSecondHand” with the "eanf" field, or by using the "dbpGroup" of the SearchEngine response.
Update | Remove
make sure you have added the dbp parameter in the update and remove, see this link:
Get the second hand products by ean
The Web Service “/product/infoSecondHand…” give you the bookstore real-time stock in order to check the second hand product availability. It is recommended to use it as check with your SearchEngine search as well. As the data provided by the ERP is only generated every 24 hours. By using this Web Service, you can ensure that the stock information is up-to-date. An ordered item is removed as soon as it has been processed by the ERP (Medialog)
The Web Service uses the actual (new) EAN of the article in the "ean" field.
Example
https://wsmedia.tlsecure.com/api/json/xxxxx/product/infoSecondHand?ean=9789076174112
Request
HTTP Verb : GET
URL : http://{WS_URL}/api/{returnType}/{domainCode}/product/infoSecondHand?ean=
The parameter {ean} can be separate by a coma to get several eans at the same request. Example: https://wsmedia.tlsecure.com/api/json/0/product/infoSecondHand?ean=9789065391124,9789025752095,9789089982087
Parameters | Location | Type | Required | Default | Accepted | Info |
---|---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
|
ean | Params | String(26) | v |
|
|
|
image | QueryParams | Boolean |
| false |
|
|
shop | QueryParams | String |
|
|
| Can enter a single ID or multiple IDs separated by commas |
Response
Variables | Description |
---|---|
ean | ISBN-13 |
stock | Stock physique in the shop |
available | (Stock physique in the shop) substract (Stock in order or reserved) |
order | quantity order to provider |
known | If the product is known in MediaLog |
price | Price in MediaLog |
headGroup | The first level for the ranking |
group | The second level for the ranking |
category | The third level for the ranking |
message | Fields that describe the state for example |
rating | Assessment of the state in the form of a rating |
eanf | Ean create in medialog |
Success
{
"response": {
"success": true,
"code": 0,
"message": "product retrieved",
"object": {
"shops": {
"shop": [
{
"id": 16,
"name": "TiteLive Benelux",
"addressLine1": "Rue terre à briques 6",
"postcode": "7500",
"city": "Tournai",
"country": 1,
"phone": "015 45 16 12",
"email": "mediaweb@titelive.be",
"defaultShop": true,
"product": [
{
"ean": 9789076174112,
"origin": "MEDIALOG",
"known": 1,
"price": 10.0,
"headGroup": "2DEHANDS BOEKEN",
"group": "2DEHANDS BOEKEN",
"category": "91",
"message": "",
"rating": 3,
"eanf": 2100000003860
},
{
"ean": 9789076174112,
"origin": "MEDIALOG",
"stock": 1,
"available": 1,
"known": 1,
"price": 20.0,
"headGroup": "2DEHANDS BOEKEN",
"group": "2DEHANDS BOEKEN",
"category": "91",
"message": "goeie staat",
"rating": 5,
"eanf": 2100000010615
}
]
}
]
}
}
}
}
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 |
| ean not exist |
11 |
| configuration to mediaLog not exist |
99 |
| uncatched exception |