{
  "info": {
    "name": "IoneShop Commerce API v1",
    "description": "Sandbox-first collection for IoneShop partner API. Set baseUrl and apiKey. Capability matrix: https://developers.ioneshop.eu/docs/availability",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Products",
      "item": [
        {
          "name": "List products",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Accept", "value": "application/json" }
            ],
            "url": "{{baseUrl}}/products?limit=25"
          }
        },
        {
          "name": "Create product",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Idempotency-Key", "value": "{{$guid}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Ceramic bottle 500ml\",\n  \"status\": \"draft\",\n  \"variants\": [\n    {\n      \"sku\": \"BOTTLE-500\",\n      \"prices\": [{ \"amount\": 2499, \"currency\": \"EUR\" }]\n    }\n  ]\n}"
            },
            "url": "{{baseUrl}}/products"
          }
        }
      ]
    },
    {
      "name": "Orders",
      "item": [
        {
          "name": "List paid orders",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" }
            ],
            "url": "{{baseUrl}}/orders?status=paid&limit=50"
          }
        }
      ]
    },
    {
      "name": "Inventory",
      "item": [
        {
          "name": "Set inventory level",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Idempotency-Key", "value": "{{$guid}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"BOTTLE-500\",\n  \"location_id\": \"sloc_main\",\n  \"quantity\": 120\n}"
            },
            "url": "{{baseUrl}}/inventory/levels"
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Create webhook",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Idempotency-Key", "value": "{{$guid}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/hooks/ioneshop\",\n  \"events\": [\"order.paid\", \"inventory.changed\"],\n  \"description\": \"Postman sandbox\"\n}"
            },
            "url": "{{baseUrl}}/webhooks"
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://sandbox-api.ioneshop.cloud/v1"
    },
    {
      "key": "apiKey",
      "value": "isk_test_replace_me"
    }
  ]
}
