Merchants
Version 2
Warehouses

Warehouses API v2

Use the Merchant API v2 warehouse endpoints to list the pickup addresses configured for the authenticated merchant or retrieve one of them by its pickup address ID.

Table of Contents

  1. Variables
  2. List Warehouses
  3. Retrieve a Warehouse
  4. Warehouse Fields
  5. Use a Warehouse for Voucher Creation

Variables

  • merchantAPIEndpoint: https://merchant.api.shopflix.gr/v2
  • idPickupAddress: 42

Both endpoints require Merchant API authentication. See Authentication for request setup.

1. List Warehouses

Example
GET {merchantAPIEndpoint}/warehouses?page=1&itemsPerPage=5

Query Parameters

NameTypeDescriptionRequiredDefault
pageintegerPage number, starting from 1.No1
itemsPerPageintegerNumber of warehouses per page. The maximum is 5; larger values are limited to 5. The legacy alias items_per_page is also accepted.No5

Response

Status: 200 OK

Content-Type: application/json

response
{
  "warehouses": [
    {
      "id_pickup_address": 42,
      "address": "10 Kifisias Avenue",
      "city": "Athens",
      "courier_account_id": "CC-12345",
      "is_default": true,
      "label": "Main warehouse",
      "postal_code": "11526"
    }
  ],
  "params": {
    "page": 1,
    "items_per_page": 5,
    "total_items": 1
  }
}

Warehouse response fields use snake_case in both Merchant API versions. An authenticated merchant only receives warehouses associated with its own merchant profile.


2. Retrieve a Warehouse

Example
GET {merchantAPIEndpoint}/warehouses/{idPickupAddress}

Path Parameters

NameTypeDescriptionRequired
idPickupAddressintegerPickup address ID of the warehouse.Yes

Response

Status: 200 OK
response
{
  "id_pickup_address": 42,
  "address": "10 Kifisias Avenue",
  "city": "Athens",
  "courier_account_id": "CC-12345",
  "is_default": true,
  "label": "Main warehouse",
  "postal_code": "11526"
}

If the warehouse does not exist or does not belong to the authenticated merchant, the endpoint returns:

Status: 404 Not Found
response
{
  "message": "The warehouse with id 42 was not found"
}

Warehouse Fields

FieldTypeDescription
id_pickup_addressintegerUnique pickup address ID.
addressstringStreet address.
citystringCity.
courier_account_idstring | nullCourier account associated with the warehouse, when available.
is_defaultbooleanWhether this is the merchant's default warehouse.
labelstring | nullMerchant-defined warehouse label, when available.
postal_codestringPostal code.

Use a Warehouse for Voucher Creation

Pass the warehouse's id_pickup_address as idPickupAddress in the request body when you create a v2 shipment voucher. If it is omitted, the Merchant API uses the merchant's default warehouse.