Fulfilled by Skroutz API Edit the file on GitHub
Fulfilled by Skroutz API allows Skroutz Merchants to retrieve information about the purchase orders and related products that are stored in Skroutz warehouses, as well as create new purchase orders. Moreover, a merchant may access their related Fullfilled by Skroutz suppliers and create new or update existing ones.
Table of Contents
- Setup
- Endpoints
- Error handling
- Purchase Order object attributes appendix
- Product object attributes appendix
- Supplier object attributes appendix
Setup
Obtaining an API token
In order to be able to use the API, you need to generate an API token from within Smart Cart settings page in merchant's panel (Merchants > Services > Skroutz Marketplace).
There can only be one active API key per shop at a certain time. Creating a new API key will expire any previous one.
Authorization
Pass in a valid API token in the Authorization
header, prefixed with Bearer
as in the following curl example.
A specific Accept
header is also required.
curl -X GET https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Authorization: Bearer your_access_token_here'
Endpoints
Products
To retrieve a shop's Fulfilled by Skroutz available products.
GET /merchants/ecommerce/fbs/products
Example
curl -X GET https://api.skroutz.gr/merchants/ecommerce/fbs/products \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Authorization: Bearer your_access_token_here'
GET https://api.skroutz.gr/merchants/ecommerce/fbs/products
View ResponseStatus: 200
{
"products": [
{
"id": 12345678,
"shop_uid": "79",
"active": true,
"quantity": 13
},
{
"id": 87654321,
"shop_uid": "254",
"active": false,
"quantity": 0
}
],
"meta": {
"pagination": {
"total_results": 2,
"total_pages": 1,
"page": 1,
"per": 100
}
}
}
Purchase Orders
Retrieve purchase orders
To retrieve a shop's Fulfilled by Skroutz purchase orders.
GET /merchants/ecommerce/fbs/purchase_orders
Example
curl -X GET https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Authorization: Bearer your_access_token_here'
GET https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders
View ResponseStatus: 200
{
"purchase_orders": [
{
"code": "123456-1234-1234",
"received_at": "2022-05-30T11:10:28+03:00",
"created_at": "2022-05-27T12:58:18+03:00",
"expected_date": "2022-05-30"
},
{
"code": "654321-4321-4321",
"received_at": "2022-06-07T03:26:52+03:00",
"created_at": "2022-06-02T21:51:12+03:00",
"expected_date": "2022-06-06"
}
],
"meta": {
"pagination": {
"total_results": 2,
"total_pages": 1,
"page": 1,
"per": 100
}
}
}
Create a new purchase order.
To create a new Fulfilled by Skroutz purchase order
POST /merchants/ecommerce/fbs/purchase_orders
Example
curl -X POST https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Content-Type: application/json; charset=utf-8' \ -H 'Authorization: Bearer your_access_token_here' \ -d '{ "expected_date": "2022-09-22", "supplier_id": "z0VGVY3M1m", "line_items": [ { "product_uid": "52781", "expected_quantity": 8, "keep_serial_numbers": true, "has_expiration_date": false, "storage_conditions": 2 } ] }'
POST https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders
View Response Params{
"expected_date": "2022-09-22",
"supplier_id": "z0VGVY3M1m",
"line_items": [
{
"product_uid": "52781",
"expected_quantity": 9,
"keep_serial_numbers": true,
"has_expiration_date": true,
"storage_conditions": 1
}
]
}
More info about the order creation options can be found in the appendix.
Purchase order line items
To retrieve a Fulfilled by Skroutz purchase order line items
GET /merchants/ecommerce/fbs/purchase_orders/:code/line_items
Example
curl -X GET https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders/220623-4078-5820/line_items \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Authorization: Bearer your_access_token_here'
GET https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders/123456-1234-1234/line_items
View ResponseStatus: 200
{
"purchase_order_line_items": [
{
"product_id": 12345678,
"shop_uid": "1234",
"active": true,
"expected_quantity": 10,
"actual_quantity": 10
},
{
"product_id": 87654321,
"shop_uid": "4321",
"active": true,
"expected_quantity": 6,
"actual_quantity": 6
}
],
"meta": {
"pagination": {
"total_results": 2,
"total_pages": 1,
"page": 1,
"per": 100
}
}
}
Suppliers
Retrieve shop suppliers
To retrieve a list with the shop's Fulfilled by Skroutz suppliers.
GET /merchants/ecommerce/fbs/suppliers
Example
curl -X GET https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Authorization: Bearer your_access_token_here'
GET https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers
View ResponseStatus: 200
{
"suppliers": [
{
"id": "abcdefghi",
"code": "ubersuppliercode",
"name": "ubersuppliername",
"address": "Κέντρου Καρδίτσης 8",
"city": "Καρδίτσα",
"area": "Θεσσαλία",
"zip_code": "43100",
"phone": "2441123456",
"tax_number": null,
"email": "ubermail@ubersupplier.gr"
}
],
"meta": {
"pagination": {
"total_results": 1,
"total_pages": 1,
"page": 1,
"per": 100
}
}
}
Create shop supplier
To create a new Fulfilled by Skroutz supplier.
POST /merchants/ecommerce/fbs/suppliers
Example
curl -X POST https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Content-Type: application/json; charset=utf-8' \ -H 'Authorization: Bearer your_access_token_here' \ -d '{ "id": "xjvKD5Xr51", "code": "supplier_code", "name": "supplier_name", "address": "supplier_address", "city": "Athens", "area": "Attica", "zip_code": "42200", "phone": "1234567890", "tax_number": "1234567890", "email": "info@randomsupplier.gr" }'
POST https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers
View Response Params{
"id": "abcdefghi",
"code": "ubersuppliercode",
"name": "ubersuppliername",
"address": "Κέντρου Καρδίτσης 8",
"city": "Καρδίτσα",
"area": "Θεσσαλία",
"zip_code": "43100",
"phone": "2441123456",
"tax_number": "1234567890",
"email": "ubermail@ubersupplier.gr"
}
Update shop supplier
To update a new Fulfilled by Skroutz supplier. Only the values to be updated should be provided. The rest of the fields will remain unchanged.
PATCH /merchants/ecommerce/fbs/suppliers/:supplier_id
Example
curl -X PATCH https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers/abcdefgh \ -H 'Accept: application/vnd.skroutz+json; version=3.0' \ -H 'Content-Type: application/json; charset=utf-8' \ -H 'Authorization: Bearer your_access_token_here' \ -d '{ "address": "Another Address", "email": "newmail@newmail.gr" }'
PATCH https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers
View Response Params{
"address": "Another Address",
"email": "newmail@newmail.gr"
}
More info about the supplier creation and update options can be found in the appendix.
Error handling
In case of errors, the response will have a representative HTTP status code
in the 4xx
or 5xx
range. The body would contain an array of errors
.
For example, if you try to view a purchase order that belongs to another shop, you will
get a 401
HTTP status code (Unauthorized), with the following body:
{
"errors": [
{
"code": "purchase_order_error",
"messages": [
"Invalid purchase order"
]
}
]
}
If there is no purchase order with the provided code, you will
get a 404
HTTP status code (Not Found), with the same body as above.
Purchase Order object attributes appendix
Purchase Order object
Name | Type | Description |
---|---|---|
code |
String | Purchase Order code |
received_at |
Date String in formatYYYY-MM-DDTHH:MM:SS+HH:M |
Date the purchase order was received by Skroutz warehouses |
created_at |
Date String in formatYYYY-MM-DDTHH:MM:SS+HH:M |
Purchase Order creation date |
expected_date |
Date String in formatYYYY-MM-DD |
Date the purchase order is expected to be received by Skroutz warehouses |
Purchase Order Line Item Object
Name | Type | Description |
---|---|---|
product_id |
String | Unique product id |
shop_uid |
String | Item id in shop |
active |
Boolean | Product is available for purchase from Skroutz warehouses |
expected_quantity |
Integer | The quantity expected to be received by Skroutz warehouses |
actual_quantity |
Integer | The quantity received by Skroutz warehouses |
Purchase Order creation options
These are valid values to POST to the corresponding keys when creating a new Purchase Order.
Name | Type | Example | Description |
---|---|---|---|
new_purchase_order.expected_date |
Date String in formatYYYY-MM-DD |
"2022-09-22" | Date the Purchase Order is expected to reach the Skroutz warehouses |
new_purchase_order.supplier_id |
String | "abs30220" | The supplier ID. Can be fetched from the list of the shop's suppliers |
new_purchase_order.line_items |
Array | The Purchase Order line items |
Purchase Order creation options: Line items
Name | Type | Example | Description |
---|---|---|---|
line_item.product_uid |
String | "52781" | Unique product id |
line_item.expected_quantity |
Integer | 8 | The quantity of this product that the Skroutz warehouse will receive |
line_item.keep_serial_numbers |
Boolean | true | Product requires serial numbers for each unit sold |
line_item.has_expiration_date |
Boolean | true | Product has expiration date |
line_item.storage_conditions |
Integer | 2 | Product storage conditions (possible values: 0 for dry, 1 for air conditioned, 2 for refrigirated, 3 for frozen) |
Product object attributes appendix
Product object
Name | Type | Description |
---|---|---|
id |
String | Unique product id |
shop_uid |
String | Item id in shop |
active |
Boolean | Product is available for purchase from Skroutz warehouses |
quantity |
Integer | The product quantity in Skroutz warehouses |
Supplier object attributes appendix
Supplier object
Name | Type | Description |
---|---|---|
id |
String | Supplier id |
code |
String | Supplier code |
name |
String | Supplier name |
address |
String | Supplier address |
city |
String | Supplier City |
area |
String | Supplier Area |
zip_code |
String | Supplier Zip Code |
phone |
String | Supplier Phone |
tax_number |
String | Supplier Tax Number |
email |
String | Supplier Email |
Supplier creation/update options
These are valid values to POST to the corresponding keys when creating or updating fbs suppliers.
Name | Type | Example | Description |
---|---|---|---|
new_supplier.id |
String | "abs30220" | The supplier ID. Can be fetched from the list of the shop's suppliers |
new_supplier.code |
String | "a_code" | Unique Supplier Code |
new_supplier.name |
String | "a_name" | Supplier Name |
new_supplier.address |
String | "Adamantos 4 Lykavittos" | Supplier Address |
new_supplier.city |
String | "Athens" | Supplier City |
new_supplier.area |
String | "Attica" | Supplier Area |
new_supplier.zip_code |
String | "88888" | Supplier Zip Code |
new_supplier.phone |
String | "2101234567" | Supplier Phone |
new_supplier.tax_number |
String | "1234567890" | Supplier Tax Number |
new_supplier.email |
String | "mail@suppliermail.gr" | Supplier Email |