### Install Dependencies and Run Middleman Server
Source: https://github.com/skroutz/developer.skroutz.gr/blob/master/README.md
Follow these steps to set up the development environment. Ensure you have the latest changes and then install dependencies. Leave the Middleman server running for auto-compilation.
```bash
git pull
bundle install
bundle exec middleman server
```
--------------------------------
### Example Webhook Payload for New Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
This is an example of the JSON payload received when a new order is created. It includes order details, customer information, and line items.
```json
POST https://your-shop.gr/smart_cart_orders
Content-Type: application/json; charset=utf-8
User-Agent: Skroutz OrderNotifier v1
{
"event_type": "new_order",
"event_time": "2019-11-28T13:24:37+02:00",
"order": {
"code": "191029-5130474",
"state": "open",
"customer": {
"id": "PA4oqvpz8x",
"first_name": "John",
"last_name": "Doe",
"address": {
"street_name": "Panepistimiou",
"street_number": "4",
"zip": "12345",
"city": "Athens",
"region": "Attica",
"country_code": "GR"
}
},
"line_items": [
{
"id": "l39vKqxqwe",
"shop_uid": "100",
"product_name": "Samsung Galaxy S21",
"quantity": 2,
"unit_price": 799.00,
"total_price": 1598.00,
"price_includes_vat": true,
"commission": 133.27,
"commission_rate": 8.34
}
],
"created_at": "2019-11-28T13:24:37+02:00",
"expires_at": "2019-12-04T10:24:00+02:00",
"payment_method": "card",
"accept_options": {...},
"reject_options": {...}
}
}
```
--------------------------------
### Product Catalog XML Feed Example
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
This XML structure represents a product catalog feed. Ensure all required product attributes are included. For files larger than 10MB, compression (zip/gzip) is necessary.
```xml
2024-01-15 09:30SKU-12345Samsung Galaxy S24 Ultra 256GB Titanium Black
https://www.yourshop.gr/products/samsung-galaxy-s24-ultra
https://www.yourshop.gr/images/samsung-s24-ultra.jpghttps://www.yourshop.gr/images/samsung-s24-ultra-back.jpgMobile Phones > Smartphones1399.0024.00Available in 1-3 daysSamsungSM-S928BZKGEUE8806095358093256GBTitanium Black23225Samsung Galaxy S24 Ultra features a 6.8" Dynamic AMOLED 2X display,
Snapdragon 8 Gen 3 processor, 200MP camera system, and S Pen support.SKU-12346Apple iPhone 15 Pro Max 256GB Natural Titanium
https://www.yourshop.gr/products/iphone-15-pro-max
https://www.yourshop.gr/images/iphone-15-pro-max.jpgMobile Phones > Smartphones1549.0024.00Available immediatelyAppleMU793GH/A194253939146Natural Titanium15YiPhone 15 Pro Max with A17 Pro chip, titanium design,
48MP camera system with 5x optical zoom, and USB-C connectivity.
```
--------------------------------
### Example Webhook Payload for Order Update (Cancellation)
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
This is an example of the JSON payload received when an order is updated, specifically for a cancellation event. It shows the old and new state of the order.
```json
{
"event_type": "order_updated",
"event_time": "2019-10-29T10:39:23+02:00",
"order": {
"code": "191029-5130474",
"state": "cancelled"
},
"changes": {
"state": {"old": "open", "new": "cancelled"}
}
}
```
--------------------------------
### POST /merchants/ecommerce/orders/{order_id}/set_as_ready
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Mark an order as ready for dispatch (for shops enrolled in the "Set as Ready" program). This notifies the courier (Skroutz Last Mile) that the order is ready for pickup and may trigger auto-reschedule to an earlier pickup window.
```APIDOC
## POST /merchants/ecommerce/orders/{order_id}/set_as_ready
### Description
Mark an order as ready for dispatch (for shops enrolled in the "Set as Ready" program). This notifies the courier (Skroutz Last Mile) that the order is ready for pickup and may trigger auto-reschedule to an earlier pickup window.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_id}/set_as_ready
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The unique identifier of the order.
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the order was successfully marked as ready.
#### Response Example
```json
{
"success": true
}
```
```
--------------------------------
### Reject Order with Custom Reason
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this endpoint to reject an order and provide a custom reason. A comment is required for the rejection.
```bash
curl -X POST https://api.skroutz.gr/merchants/cps/orders/1234567/reject \
-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 '{
"reason": {
"name": "other",
"comment": "Our store is closed for personal reasons"
}
}'
```
--------------------------------
### Initialize Skroutz Analytics
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Place this script on your thank you/receipt page to initialize the Skroutz Analytics object. Ensure you replace 'SA-XXXX-YYYY' with your actual tracking ID.
```html
```
--------------------------------
### Accept Smart Cart Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Accept an order by providing the pickup location ID, pickup window ID, and optionally the number of parcels. Ensure the order is not an express order, as those are automatically accepted.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/accept \
-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 '{
"pickup_location": "YlpD0KROym",
"pickup_window": 2,
"number_of_parcels": 1
}'
```
--------------------------------
### List Fulfilled by Skroutz (FBS) Products
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Retrieve a list of products stored in Skroutz warehouses for your shop. Includes stock and product details.
```bash
# List FBS products
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'
```
```json
# Response: 200 OK
{
"products": [
{
"uid": "52781",
"name": "Samsung Galaxy S21 128GB",
"ean": "8806092081234",
"available_quantity": 50,
"reserved_quantity": 5
}
]
}
```
--------------------------------
### Batch Update Products with Skroutz Products API
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this endpoint to update product inventory (availability, price, and quantity) in bulk for up to 500 products per request. Include variations if applicable. Ensure your access token is valid.
```bash
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
}
]
}
]
}'
```
```json
{
"message": "Batch update processed successfully"
}
```
--------------------------------
### Mark Smart Cart Order as Ready
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Mark an order as ready for dispatch, which notifies the courier (Skroutz Last Mile). This action is part of the 'Set as Ready' program and may trigger an earlier pickup window.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/260225-123456/set_as_ready \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### Create Fulfilled by Skroutz (FBS) Purchase Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Create a new purchase order to send inventory to Skroutz warehouses. Specify expected delivery, supplier, and line items with quantities and storage conditions.
```bash
# Create FBS purchase order
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
}
]
}'
```
```json
# Response: 201 Created
{
"purchase_order": {
"code": "220623-4078-5820",
"state": "pending",
"expected_date": "2022-09-22",
"supplier_id": "z0VGVY3M1m"
}
}
```
--------------------------------
### Webhook - Receiving Order Events
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Configure a webhook URL to receive real-time notifications for order events like creation and updates.
```APIDOC
## Webhook - Receiving Order Events
### Description
Configure a webhook URL to receive real-time notifications when orders are created or updated. Webhook requests are HTTP POST with JSON payload, originating from Skroutz IP ranges. Failed requests are retried up to 4 times within 20 minutes.
### Request Example (New Order Payload)
```json
{
"event_type": "new_order",
"event_time": "2019-11-28T13:24:37+02:00",
"order": {
"code": "191029-5130474",
"state": "open",
"customer": {
"id": "PA4oqvpz8x",
"first_name": "John",
"last_name": "Doe",
"address": {
"street_name": "Panepistimiou",
"street_number": "4",
"zip": "12345",
"city": "Athens",
"region": "Attica",
"country_code": "GR"
}
},
"line_items": [
{
"id": "l39vKqxqwe",
"shop_uid": "100",
"product_name": "Samsung Galaxy S21",
"quantity": 2,
"unit_price": 799.00,
"total_price": 1598.00,
"price_includes_vat": true,
"commission": 133.27,
"commission_rate": 8.34
}
],
"created_at": "2019-11-28T13:24:37+02:00",
"expires_at": "2019-12-04T10:24:00+02:00",
"payment_method": "card",
"accept_options": {...},
"reject_options": {...}
}
}
```
### Request Example (Order Update Payload - Cancellation)
```json
{
"event_type": "order_updated",
"event_time": "2019-10-29T10:39:23+02:00",
"order": {
"code": "191029-5130474",
"state": "cancelled"
},
"changes": {
"state": {"old": "open", "new": "cancelled"}
}
}
```
### Response
#### Success Response (200)
Your server should respond with HTTP 200 OK to acknowledge receipt of the webhook.
#### Response Example
```
HTTP/1.1 200 OK
```
```
--------------------------------
### Retrieve and Reject Cost-Per-Sale (CPS) Orders
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Endpoints for retrieving CPS orders and rejecting them with predefined reasons or custom explanations.
```bash
# Retrieve CPS order
curl -X GET https://api.skroutz.gr/merchants/cps/orders/1234567 \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
```json
# Response: 200 OK
{
"order": {
"code": "1234567",
"state": "open",
"reject_options": {
"reasons": [
{"name": "user_cancel", "label": "User cancelled"},
{"name": "out_of_stock", "label": "Out of stock"},
{"name": "other", "label": "Other reason"}
]
}
}
}
```
```bash
# Reject with predefined reason
curl -X POST https://api.skroutz.gr/merchants/cps/orders/1234567/reject \
-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 '{"reason": {"name": "user_cancel"}}'
```
--------------------------------
### Products API - Batch Update Products
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Updates product inventory (availability, price, and quantity) in bulk. Supports up to 500 products per request with their variations.
```APIDOC
## POST /merchants/products/batch
### Description
Updates product inventory (availability, price, and quantity) in bulk. This endpoint supports updating up to 500 products per request with their variations, enabling real-time synchronization between your e-shop inventory and Skroutz listings.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/products/batch
### Parameters
#### Request Body
- **data** (array) - Required - An array of product objects to update.
- **product_id** (string) - Required - The unique identifier for the product.
- **quantity** (integer) - Optional - The new quantity of the product.
- **enabled** (boolean) - Optional - Whether the product is enabled or not.
- **price** (integer) - Optional - The new price of the product in cents.
- **variations** (array) - Optional - An array of variation objects to update.
- **variation_id** (string) - Required - The unique identifier for the variation.
- **quantity** (integer) - Optional - The new quantity of the variation.
- **enabled** (boolean) - Optional - Whether the variation is enabled or not.
- **price** (integer) - Optional - The new price of the variation in cents.
### Request Example
```json
{
"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
}
]
}
]
}
```
### Response
#### Success Response (200)
- **message** (string) - Confirmation message.
#### Response Example
```json
{
"message": "Batch update processed successfully"
}
```
```
--------------------------------
### Undo: Mark Smart Cart Order as Not Ready
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Revert the 'Set as Ready' status for an order, marking it as not ready for dispatch. This action can be used to undo a previous 'set_as_ready' call.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/260225-123456/set_as_not_ready \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### POST /merchants/ecommerce/orders/{order_id}/set_as_not_ready
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Undo the "Set as Ready" status, marking the order as not ready for dispatch.
```APIDOC
## POST /merchants/ecommerce/orders/{order_id}/set_as_not_ready
### Description
Undo the "Set as Ready" status, marking the order as not ready for dispatch.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_id}/set_as_not_ready
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The unique identifier of the order.
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the order was successfully marked as not ready.
#### Response Example
```json
{
"success": true
}
```
```
--------------------------------
### Manage Fulfilled by Skroutz (FBS) Suppliers
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Endpoints for creating and updating suppliers for FBS purchase orders. Includes listing, creating, and patching supplier information.
```bash
# List suppliers
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'
```
```bash
# Create a new supplier
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 '{
"code": "supplier_code",
"name": "Main Supplier Ltd",
"address": "Industrial Zone 15",
"city": "Athens",
"area": "Attica",
"zip_code": "12345",
"phone": "2101234567",
"tax_number": "123456789",
"email": "info@supplier.gr"
}'
```
```bash
# Update existing supplier
curl -X PATCH https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers/z0VGVY3M1m \
-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": "New Address 25",
"email": "newmail@supplier.gr"
}'
```
--------------------------------
### Fulfilled by Skroutz API - Create Purchase Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Create a new purchase order to send inventory to Skroutz warehouses. Specify the expected delivery date, supplier, and line items with quantities and storage conditions.
```APIDOC
## POST /merchants/ecommerce/fbs/purchase_orders
### Description
Create a new purchase order to send inventory to Skroutz warehouses. Specify the expected delivery date, supplier, and line items with quantities and storage conditions.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/fbs/purchase_orders
### Request Body
- **expected_date** (string) - Required - The expected delivery date in YYYY-MM-DD format.
- **supplier_id** (string) - Required - The unique identifier of the supplier.
- **line_items** (array) - Required - A list of items to be included in the purchase order.
- **product_uid** (string) - Required - The unique identifier of the product.
- **expected_quantity** (integer) - Required - The quantity of the product expected.
- **keep_serial_numbers** (boolean) - Required - Whether to keep serial numbers for the product.
- **has_expiration_date** (boolean) - Required - Whether the product has an expiration date.
- **storage_conditions** (integer) - Required - The storage conditions code for the product.
### Request Example
```json
{
"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
}
]
}
```
### Response
#### Success Response (201)
- **purchase_order** (object) - Details of the created purchase order.
- **code** (string) - The unique code of the purchase order.
- **state** (string) - The current state of the purchase order (e.g., "pending").
- **expected_date** (string) - The expected delivery date.
- **supplier_id** (string) - The identifier of the supplier.
#### Response Example
```json
{
"purchase_order": {
"code": "220623-4078-5820",
"state": "pending",
"expected_date": "2022-09-22",
"supplier_id": "z0VGVY3M1m"
}
}
```
```
--------------------------------
### Trigger New Order Webhook Request
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this curl command to trigger a test webhook request for a new order. Replace DEMO-OPEN with an available demo order code.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-OPEN/trigger_webhook_request/creation \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### POST /merchants/ecommerce/orders/{order_id}/invoices
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Upload a receipt or invoice document for an order. Supported file types are PDF, PNG, and JPG with a maximum size of 7MB. Subsequent uploads will replace the existing file.
```APIDOC
## POST /merchants/ecommerce/orders/{order_id}/invoices
### Description
Upload a receipt or invoice document for an order. Supported file types are PDF, PNG, and JPG with a maximum size of 7MB. Subsequent uploads will replace the existing file.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_id}/invoices
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The unique identifier of the order.
#### Request Body
- **invoice_file** (file) - Required - The invoice or receipt file to upload. Supported formats: PDF, PNG, JPG. Max size: 7MB.
### Request Example
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/invoices \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer your_access_token_here' \
-F 'invoice_file=@/path/to/invoice.pdf'
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the upload was successful.
#### Response Example
```json
{
"success": true
}
```
```
--------------------------------
### Fulfilled by Skroutz API - List Products
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Retrieve the list of products stored in Skroutz warehouses for your shop, including stock quantities and product details.
```APIDOC
## GET /merchants/ecommerce/fbs/products
### Description
Retrieve the list of products stored in Skroutz warehouses for your shop, including stock quantities and product details.
### Method
GET
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/fbs/products
### Response
#### Success Response (200)
- **products** (array) - A list of products in Skroutz warehouses.
- **uid** (string) - The unique identifier of the product.
- **name** (string) - The name of the product.
- **ean** (string) - The EAN (European Article Number) of the product.
- **available_quantity** (integer) - The number of available units in stock.
- **reserved_quantity** (integer) - The number of units currently reserved.
#### Response Example
```json
{
"products": [
{
"uid": "52781",
"name": "Samsung Galaxy S21 128GB",
"ean": "8806092081234",
"available_quantity": 50,
"reserved_quantity": 5
}
]
}
```
```
--------------------------------
### Upload Invoice for Smart Cart Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Upload an invoice or receipt document for an order. Supported formats are PDF, PNG, and JPG, with a maximum file size of 7MB. Each upload replaces any previously uploaded file.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/invoices \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer your_access_token_here' \
-F 'invoice_file=@/path/to/invoice.pdf'
```
--------------------------------
### Expected Response from Your Server
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
This is the expected HTTP response from your server when receiving a webhook request from Skroutz.
```http
HTTP/1.1 200 OK
```
--------------------------------
### Track Individual Items in an Order with Skroutz Analytics
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Add this snippet to track each individual item within an order. Ensure the 'order_id' matches the one used in the 'addOrder' call. This provides granular detail on purchased products.
```html
```
--------------------------------
### Webhook - Test Sandbox Endpoints
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Trigger test webhook requests to validate your integration using demo order codes.
```APIDOC
## Webhook - Test Sandbox Endpoints
### Description
Trigger test webhook requests to validate your integration using demo order codes. These endpoints send webhook payloads to your configured webhook URL.
### Method
POST
### Endpoints
- **Trigger new order webhook:** `https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-OPEN/trigger_webhook_request/creation`
- **Trigger courier voucher update webhook:** `https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-ACCEPTED/trigger_webhook_request/voucher_update`
- **Trigger order cancellation webhook:** `https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-OPEN/trigger_webhook_request/cancellation`
### Parameters
#### Path Parameters
- **DEMO-OPEN**, **DEMO-ACCEPTED**, etc. (string) - Required - Available demo order codes for triggering webhooks.
### Available Demo Order Codes
- DEMO-OPEN
- DEMO-ACCEPTED
- DEMO-REJECTED
- DEMO-INVOICE
- DEMO-INVOICE39A
- DEMO-INVOICE-VIES
- DEMO-FBS
- DEMO-FBS-DISPATCHED
- DEMO-STORE-PICKUP
- DEMO-FEES
- DEMO-REPLACEMENT
- DEMO-REPLACED
- DEMO-RETURN
### Request Example (Trigger New Order Webhook)
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-OPEN/trigger_webhook_request/creation \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
```
--------------------------------
### POST /merchants/ecommerce/orders/{order_id}/reject
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Reject an order by specifying line items with rejection reasons, or reject the entire order with a custom reason. Use the rejection reason IDs from the `reject_options` in the order response.
```APIDOC
## POST /merchants/ecommerce/orders/{order_id}/reject
### Description
Reject an order by specifying line items with rejection reasons, or reject the entire order with a custom reason. Use the rejection reason IDs from the `reject_options` in the order response.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_id}/reject
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The unique identifier of the order.
#### Request Body
*Either `line_items` or `rejection_reason_other` must be provided.*
- **line_items** (array) - Optional - An array of line items to reject.
- **id** (string) - Required - The ID of the line item.
- **reason_id** (integer) - Required - The ID of the rejection reason.
- **available_quantity** (integer) - Optional - The available quantity if the rejection is due to stock.
- **rejection_reason_other** (string) - Optional - A custom reason for rejecting the entire order.
### Request Example
```json
# Reject specific line items with reasons
{
"line_items": [
{"id": "jn231kb12u", "reason_id": 2},
{"id": "opaoe8M3pZ", "reason_id": 4, "available_quantity": 1}
]
}
# Reject entire order with custom reason
{
"rejection_reason_other": "Our store is closed for personal reasons"
}
```
### Response
#### Success Response (200)
- **order** (object) - Details of the rejected order.
- **code** (string) - The order code.
- **state** (string) - The current state of the order (e.g., "rejected").
#### Response Example
```json
{
"order": {
"code": "191128-1234567",
"state": "rejected"
}
}
```
```
--------------------------------
### Fulfilled by Skroutz API - Manage Suppliers
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Create and update suppliers for Fulfilled by Skroutz purchase orders.
```APIDOC
## Supplier Management (FBS)
### List Suppliers
#### Method
GET
#### Endpoint
https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers
### Create a New Supplier
#### Method
POST
#### Endpoint
https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers
#### Request Body
- **code** (string) - Required - The supplier's unique code.
- **name** (string) - Required - The supplier's name.
- **address** (string) - Required - The supplier's address.
- **city** (string) - Required - The supplier's city.
- **area** (string) - Required - The supplier's area.
- **zip_code** (string) - Required - The supplier's zip code.
- **phone** (string) - Required - The supplier's phone number.
- **tax_number** (string) - Required - The supplier's tax number.
- **email** (string) - Required - The supplier's email address.
#### Request Example
```json
{
"code": "supplier_code",
"name": "Main Supplier Ltd",
"address": "Industrial Zone 15",
"city": "Athens",
"area": "Attica",
"zip_code": "12345",
"phone": "2101234567",
"tax_number": "123456789",
"email": "info@supplier.gr"
}
```
### Update Existing Supplier
#### Method
PATCH
#### Endpoint
https://api.skroutz.gr/merchants/ecommerce/fbs/suppliers/{supplier_id}
#### Parameters
##### Path Parameters
- **supplier_id** (string) - Required - The unique identifier of the supplier to update.
#### Request Body
- **address** (string) - Optional - The updated address of the supplier.
- **email** (string) - Optional - The updated email address of the supplier.
#### Request Example
```json
{
"address": "New Address 25",
"email": "newmail@supplier.gr"
}
```
```
--------------------------------
### Trigger Order Cancellation Webhook Request
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this curl command to trigger a test webhook request for an order cancellation. Replace DEMO-OPEN with an available demo order code.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-OPEN/trigger_webhook_request/cancellation \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### POST /merchants/ecommerce/orders/{order_id}/accept
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Accept a Smart Cart order by providing the pickup location, pickup window, and optionally the number of parcels. Express orders are automatically accepted and cannot be accepted via API.
```APIDOC
## POST /merchants/ecommerce/orders/{order_id}/accept
### Description
Accept a Smart Cart order by providing the pickup location, pickup window, and optionally the number of parcels. Express orders are automatically accepted and cannot be accepted via API.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_id}/accept
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The unique identifier of the order.
#### Request Body
- **pickup_location** (string) - Required - The ID of the pickup location.
- **pickup_window** (integer) - Required - The ID of the pickup window.
- **number_of_parcels** (integer) - Optional - The number of parcels for the order.
### Request Example
```json
{
"pickup_location": "YlpD0KROym",
"pickup_window": 2,
"number_of_parcels": 1
}
```
### Response
#### Success Response (200)
- **order** (object) - Details of the accepted order.
- **code** (string) - The order code.
- **state** (string) - The current state of the order (e.g., "accepted").
- **courier_voucher** (string) - URL to the courier voucher.
- **courier_tracking_codes** (array of strings) - Tracking codes for the courier.
- **pickup_window** (object) - The selected pickup window.
- **from** (string) - The start time of the pickup window.
- **to** (string) - The end time of the pickup window.
#### Response Example
```json
{
"order": {
"code": "191128-1234567",
"state": "accepted",
"courier_voucher": "https://b.scdn.gr/path-to/voucher.pdf",
"courier_tracking_codes": ["123456789"],
"pickup_window": {
"from": "2019-12-04T10:00:00+02:00",
"to": "2019-12-04T12:00:00+02:00"
}
}
}
```
```
--------------------------------
### Reject Entire Smart Cart Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Reject an entire order by providing a custom reason. This is useful when the rejection applies to the whole order and not specific items.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/reject \
-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 '{
"rejection_reason_other": "Our store is closed for personal reasons"
}'
```
--------------------------------
### Retrieve a Single Smart Cart Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Retrieve a specific Smart Cart (Marketplace) order using its unique code. The response may include `accept_options` and `reject_options` if the order is in a state where it can be accepted or rejected.
```bash
curl -X GET https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567 \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### Trigger Courier Voucher Update Webhook Request
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this curl command to trigger a test webhook request for a courier voucher update. Replace DEMO-ACCEPTED with an available demo order code.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/DEMO-ACCEPTED/trigger_webhook_request/voucher_update \
-H 'Accept: application/vnd.skroutz+json; version=3.0' \
-H 'Authorization: Bearer your_access_token_here'
```
--------------------------------
### Smart Cart Orders API - Retrieve Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Retrieves a single Smart Cart (Marketplace) order by its code. Includes accept/reject options if applicable.
```APIDOC
## GET /merchants/ecommerce/orders/{order_code}
### Description
Retrieve a single Smart Cart (Marketplace) order by its code. When the order can be accepted or rejected, the response includes `accept_options` and `reject_options` with available actions.
### Method
GET
### Endpoint
https://api.skroutz.gr/merchants/ecommerce/orders/{order_code}
### Parameters
#### Path Parameters
- **order_code** (string) - Required - The unique code of the order to retrieve.
### Response
#### Success Response (200)
- **accept_options** (object) - Available actions to accept the order.
- **reject_options** (object) - Available actions to reject the order.
#### Response Example
(Response structure for a specific order would be detailed here, including order details, items, customer info, and potentially accept/reject options.)
```
--------------------------------
### Reject Specific Line Items in Smart Cart Order
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Reject specific line items within an order by providing their IDs and a rejection reason ID. Optionally, specify the available quantity if the reason requires it.
```bash
curl -X POST https://api.skroutz.gr/merchants/ecommerce/orders/191128-1234567/reject \
-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 '{
"line_items": [
{"id": "jn231kb12u", "reason_id": 2},
{"id": "opaoe8M3pZ", "reason_id": 4, "available_quantity": 1}
]
}'
```
--------------------------------
### Reject Order with Custom Reason
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Allows merchants to reject an order with a specified reason and comment.
```APIDOC
## POST /merchants/cps/orders/{order_id}/reject
### Description
Rejects an order with a custom reason and comment.
### Method
POST
### Endpoint
https://api.skroutz.gr/merchants/cps/orders/{order_id}/reject
### Parameters
#### Path Parameters
- **order_id** (string) - Required - The ID of the order to reject.
#### Request Body
- **reason** (object) - Required - The reason for rejection.
- **name** (string) - Required - The name of the reason (e.g., "other").
- **comment** (string) - Required - A detailed comment explaining the reason for rejection.
### Request Example
```json
{
"reason": {
"name": "other",
"comment": "Our store is closed for personal reasons"
}
}
```
### Response
#### Success Response (200)
(No specific fields mentioned, typically an empty success response or a confirmation message)
#### Response Example
(No example provided in the source text)
```
--------------------------------
### Integrate Skroutz Analytics Tracking Script
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Add this script to your website to measure user interactions and e-commerce transactions. Replace SA-XXXX-YYYY with your Shop Account ID.
```html
```
--------------------------------
### Track Order Details with Skroutz Analytics
Source: https://context7.com/skroutz/developer.skroutz.gr/llms.txt
Use this snippet to report the main order details, including order ID, total revenue, shipping, tax, and payment information. This is required for e-commerce analytics.
```html
```