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.

Table of Contents

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 > Υπηρεσίες > Έξυπνο Καλάθι).

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 Response
Show Headers
Status: 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

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 Response
Show Headers
Status: 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
    }
  }
}

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 Response
Show Headers
Status: 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
    }
  }
}

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 format
YYYY-MM-DDTHH:MM:SS+HH:M
Date the purchase order was received by Skroutz warehouses
created_at Date String in format
YYYY-MM-DDTHH:MM:SS+HH:M
Purchase Order creation date
expected_date Date String in format
YYYY-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

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