Products API Edit the file on GitHub

Products API allows Skroutz Merchants to update their product inventory (availability, price, and quantity) in bulk.

Products API is designed for inventory updates and is not intended for creating new products.

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 Products settings page in Merchants 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 POST https://api.skroutz.gr/merchants/products/batch \
  -H 'Accept: application/vnd.skroutz+json; version=3.0' \
  -H 'Authorization: Bearer your_access_token_here' \
  -H 'Content-Type: application/json; charset=utf-8'

Endpoints

Batch update products

Update multiple products and their variations in a single request. You can update availability (enabled), price, and quantity for up to 500 products per request.

  POST /merchants/products/batch

Each product must include all required fields as described in the Product object attributes appendix.

POST https://api.skroutz.gr/merchants/products/batch

View Response Params
{
  "data": [
    {
      "product_id": "ABC123",
      "quantity": 10,
      "enabled": true,
      "price": 2999
    },
    {
      "product_id": "DEF456",
      "quantity": 5,
      "enabled": true,
      "price": 4999,
      "variations": [
        {
          "variation_id": "DEF456-SMALL",
          "quantity": 3,
          "enabled": true,
          "price": 4999
        },
        {
          "variation_id": "DEF456-LARGE",
          "quantity": 2,
          "enabled": true,
          "price": 5499
        }
      ]
    }
  ]
}
Show Headers
Status: 200
{
  "success": true
}

Request Parameters

Parameter Type Required Description
data Array Yes Array of product update objects
Example Request
curl -X POST https://api.skroutz.gr/merchants/products/batch \
  -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 '{
    "data": [
      {
        "product_id": "ABC123",
        "quantity": 10,
        "enabled": true,
        "price": 2999
      },
      {
        "product_id": "DEF456",
        "quantity": 5,
        "enabled": true,
        "price": 4999,
        "variations": [
          {
            "variation_id": "DEF456-SMALL",
            "quantity": 3,
            "enabled": true,
            "price": 4999
          },
          {
            "variation_id": "DEF456-LARGE",
            "quantity": 2,
            "enabled": true,
            "price": 5499
          }
        ]
      }
    ]
  }'

Validate batch payload

Validate a batch update payload without actually performing the update. This endpoint performs all validation checks that the batch endpoint does, but doesn't modify any data.

  POST /merchants/products/validate_batch_payload

POST https://api.skroutz.gr/merchants/products/validate_batch_payload

View Response Params
{
  "data": {
    "product_id": "ABC123",
    "quantity": 10,
    "enabled": true,
    "price": 2999
  }
}
Show Headers
Status: 200
{
  "success": true,
  "message": "All validations passed successfully."
}

Request Parameters

The request parameters are identical to the batch update endpoint.

Example
curl -X POST https://api.skroutz.gr/merchants/products/validate_batch_payload \
  -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 '{
    "data": [
      {
        "product_id": "ABC123",
        "quantity": 10,
        "enabled": true,
        "price": 2999
      }
    ]
  }'

Error handling

In case of errors, the response will have a representative HTTP status code in the 4xx range. The body would contain an array of errors.

Invalid Format (400 Bad Request)

When the request payload format is invalid:

{
  "errors": [
    {
      "code": "invalid_format",
      "messages": [
        "Expected an array of product updates."
      ]
    }
  ]
}

Missing Required Fields (400 Bad Request)

When required fields are missing:

{
  "errors": [
    {
      "code": "invalid_format",
      "messages": [
        "Missing required field 'product_id'",
        "Product ABC123: Missing required field 'quantity'"
      ]
    }
  ]
}

Invalid Field Types (400 Bad Request)

When field types don't match expected types:

{
  "errors": [
    {
      "code": "invalid_format",
      "messages": [
        "Product ABC123: Field 'price' has invalid type",
        "Variation DEF456-RED: Field 'enabled' has invalid type"
      ]
    }
  ]
}

Batch Size Exceeded (400 Bad Request)

When the batch contains more than 500 products:

{
  "errors": [
    {
      "code": "invalid_batch_size",
      "messages": [
        "Batch size exceeds the maximum limit of 500."
      ]
    }
  ]
}

Invalid Shop State (422 Unprocessable Entity)

When the shop is in a state that prevents updates:

{
  "errors": [
    {
      "code": "invalid_shop_state",
      "messages": [
        "Shop is not in a valid state to perform this action."
      ]
    }
  ]
}

Or when the shop's XML is being processed:

{
  "errors": [
    {
      "code": "invalid_shop_state",
      "messages": [
        "We are currently scanning your XML. Please try again later."
      ]
    }
  ]
}

Product object attributes appendix

Product object

Name Type Required Description
product_id String Yes The unique identifier of the product
quantity Integer Yes Available quantity of the product
enabled Boolean Yes Whether the product is available for purchase
price Integer Yes Product price in cents (e.g., 1050 for €10.50)
variations Array No Array of product variation objects

Variation object

Name Type Required Description
variation_id String Yes The unique identifier of the variation
quantity Integer Yes Available quantity of the variation
enabled Boolean Yes Whether the variation is available for purchase
price Integer Yes Variation price in cents (e.g., 1050 for €10.50)