{
  "info": {
    "name": "velik.ai Platform API v1",
    "description": "Generated from openapi.v1.yaml (contract hash in the Changelog at https://velik.ai/developers#changelog). Set the VELIK_API_KEY variable to a key issued in Settings → Integrations. Docs: https://velik.ai/developers",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{VELIK_API_KEY}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://velik.ai"
    },
    {
      "key": "VELIK_API_KEY",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "orders",
      "item": [
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/orders?limit=&cursor=&status=&payment=&from=&to=&since=&page_id=&product_id=&courier=&shipment_status=&q=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "orders"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Opaque cursor from a previous `next_cursor`.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "payment",
                  "value": "",
                  "description": "Payment method (`cod`, `bank`, `card`, `free`, …).",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "description": "ISO 8601 — `created_at ≥`.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "ISO 8601 — `created_at ≤`.",
                  "disabled": true
                },
                {
                  "key": "since",
                  "value": "",
                  "description": "ISO 8601 — `updated_at ≥` (polling).",
                  "disabled": true
                },
                {
                  "key": "page_id",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "product_id",
                  "value": "",
                  "description": "Orders of pages selling this product.",
                  "disabled": true
                },
                {
                  "key": "courier",
                  "value": "",
                  "description": "Courier slug, or `none` = orders without a tracking number (the fulfilment work list).",
                  "disabled": true
                },
                {
                  "key": "shipment_status",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Search in customer name / phone / email / tracking number.",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "List orders\n\nNewest first, keyset pagination. Without `status` the list excludes `archived` (pass `status=archived` to see them).\n`since` filters on `updated_at ≥` — use it for polling when you do not want webhooks.\n"
          }
        },
        {
          "name": "Get an order",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/orders/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "orders",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Get an order\n\nOne order of this account with its shipment summary. Ids are UUIDs; an order of another account is `404 not_found`."
          }
        },
        {
          "name": "Update status, tracking, courier, notes",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/orders/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "orders",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Update status, tracking, courier, notes\n\nThe status goes through the same path as the merchant's admin: `shipped` emails/SMS the customer (per the\nmerchant's notification settings; `notify_customer: false` suppresses it), `cancelled` releases reserved stock,\n`returned`/`refunded` restock. Setting the same status again is a no-op (`status_changed: false`).\nFields outside the allowed list → `400 validation_failed` with `details.allowed`.\nWith `X-Velik-Dry-Run: 1` nothing is written and the response is `OrderPatchDryRun`.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"new\",\n  \"tracking_number\": \"string\",\n  \"tracking_url\": \"string\",\n  \"courier\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "shipments",
      "item": [
        {
          "name": "Latest shipment of an order (or null)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/orders/{id}/shipment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "orders",
                ":id",
                "shipment"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Latest shipment of an order (or null)\n\nThe newest shipment (waybill) of the order, or `data: null` when none was created yet."
          }
        },
        {
          "name": "Create a waybill through the merchant's courier",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/shipments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "shipments"
              ],
              "query": [],
              "variable": []
            },
            "description": "Create a waybill through the merchant's courier\n\nUses the courier / delivery mode / office the customer chose at checkout unless overridden. Cash-on-delivery\nis computed server-side from the order. Moves a `new`/`confirmed` order to `processing` and emits\n`shipment.created` (+ `order.status_changed`). An order with a live shipment → `409 conflict`\n(`details.shipment`). Courier refusal / outage → `502 courier_error` (`details.reason`, `details.detail`).\nWith `X-Velik-Dry-Run: 1` everything up to the courier call is resolved and returned as `ShipmentCreateDryRun`.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"order_id\": \"00000000-0000-4000-8000-000000000000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a shipment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/shipments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "shipments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Get a shipment\n\nA shipment (waybill) by id: courier, tracking number, normalized status and the raw courier status events."
          }
        },
        {
          "name": "Download the PDF label",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/shipments/{id}/label",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "shipments",
                ":id",
                "label"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Download the PDF label\n\nThe courier label as `application/pdf` (attachment). The PDF is fetched from the courier on demand and is not cached."
          }
        },
        {
          "name": "Cancel a waybill at the courier",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/shipments/{id}/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "shipments",
                ":id",
                "cancel"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Cancel a waybill at the courier\n\nSpeedy and Econt confirm the cancellation; BoxNow has no cancel API (marked locally, `note` explains).\nFrees the order for a new waybill; a `shipped` order reverts to `processing` when no other live shipment\nremains. Already cancelled / delivered / refused / returned → `409 conflict`.\nWith `X-Velik-Dry-Run: 1` returns `ShipmentCancelDryRun` (ownership + `cancellable`) without calling the courier.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"comment\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "inventory",
      "item": [
        {
          "name": "Stock levels",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/inventory/stock?product_id=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "inventory",
                "stock"
              ],
              "query": [
                {
                  "key": "product_id",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Stock levels\n\nActive physical products with tracked quantity, variants and low-stock thresholds. `tracked: false` = the product does not track stock."
          }
        },
        {
          "name": "Stock ledger",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/inventory/movements?limit=&cursor=&product_id=&order_id=&type=&from=&to=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "inventory",
                "movements"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Opaque cursor from a previous `next_cursor`.",
                  "disabled": true
                },
                {
                  "key": "product_id",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "order_id",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Stock ledger\n\nStock movements newest first (sale, release, return, delivery, correction), keyset pagination. Filters: `product_id`, `order_id`, `type`, `from`, `to` (all validated up front)."
          }
        },
        {
          "name": "Record a delivery or a correction",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/inventory/movements",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "inventory",
                "movements"
              ],
              "query": [],
              "variable": []
            },
            "description": "Record a delivery or a correction\n\n`delivery` (qty > 0; optional `unit_cost` updates the weighted average cost) or `correction` (signed qty).\nThe first delivery on an untracked product enables stock tracking (`enables_tracking` in the dry run).\n`sale`/`release`/`return` are system movements and cannot be recorded manually.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product_id\": \"00000000-0000-4000-8000-000000000000\",\n  \"type\": \"delivery\",\n  \"qty\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "products",
      "item": [
        {
          "name": "Create a product",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "products"
              ],
              "query": [],
              "variable": []
            },
            "description": "Create a product\n\n`name` and `price` are required. Defaults: `delivery_type: physical`, `active: true`, no images. Stock quantity, cost, images, files and bundles cannot be set through the API (stock moves through `POST /api/v1/inventory/movements`). Unknown fields → `400 validation_failed` with `details.allowed`. With `X-Velik-Dry-Run: 1` returns `ProductCreateDryRun`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": null,\n  \"marketing_name\": null,\n  \"sku\": null,\n  \"price\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List products",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/products?limit=&cursor=&status=&delivery_type=&sku=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "products"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Opaque cursor from a previous `next_cursor`.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "`active` (default) or `all` (includes deactivated products — they still appear in orders).",
                  "disabled": true
                },
                {
                  "key": "delivery_type",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "sku",
                  "value": "",
                  "description": "Exact SKU.",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "List products\n\nThe catalog with variants, newest first. Active products only unless `status=all`; `delivery_type` must be `physical` or `digital`."
          }
        },
        {
          "name": "Get a product (also deactivated ones)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/products/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "products",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Get a product (also deactivated ones)\n\nOne product with its variants. Deactivated products are readable because orders keep referring to them."
          }
        },
        {
          "name": "Update price, SKU, name, dimensions, active…",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/products/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "products",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Update price, SKU, name, dimensions, active…\n\nAny subset of `ProductPatch`. `active: false` deactivates (the product stays in past orders). Stock quantity is not writable here — use inventory movements. With `X-Velik-Dry-Run: 1` returns `ProductPatchDryRun` (current product + normalized changes).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": null,\n  \"marketing_name\": null,\n  \"sku\": null,\n  \"price\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "customers",
      "item": [
        {
          "name": "List customers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/customers?limit=&offset=&q=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "customers"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Search in name / email / phone.",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "List customers\n\nCustomers are not rows — they are aggregated from real orders (key = lower-cased email, else phone), excluding\ncancelled / archived / refunded orders and imported contacts. Offset pagination; newest last order first.\n"
          }
        },
        {
          "name": "Saved customer segments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments"
              ],
              "query": [],
              "variable": []
            },
            "description": "Saved customer segments\n\nThe saved segments of the account (computed from filters, or membership segments filled by id)."
          }
        },
        {
          "name": "Create a segment (computed or membership)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments"
              ],
              "query": [],
              "variable": []
            },
            "description": "Create a segment (computed or membership)\n\nWith `filters` the segment is **computed** from orders (keys: `minTotal`, `maxTotal`, `minOrders`, `maxOrders`,\n`lastOrderBeforeDaysAgo`, `lastOrderAfterDate`, `lastOrderBeforeDate`, `productId`, `pageId`, `inSegment`,\n`hasEmail`, `hasPhone`, `hasAbandonedCart`; unknown keys → `400`). Without `filters` it is a **membership**\nsegment (`filters` becomes `{ inSegment: <its own id> }`) that you fill with `POST /api/v1/segments/{id}/members`\n— the way to push a list from a CRM. The merchant can email / SMS the segment from the admin.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Rename a segment or replace its filters",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Rename a segment or replace its filters\n\nSetting `filters` to `{}` turns the segment into a membership segment. With `X-Velik-Dry-Run: 1` returns `SegmentPatchDryRun`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"string\",\n  \"filters\": {\n    \"minTotal\": null,\n    \"maxTotal\": null,\n    \"minOrders\": null,\n    \"maxOrders\": null\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a segment (memberships go with it)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Delete a segment (memberships go with it)\n\nDeletes the segment; its membership rows are removed with it."
          }
        },
        {
          "name": "Add customers to a membership segment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments/{id}/members",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments",
                ":id",
                "members"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Add customers to a membership segment\n\nUp to 500 customers per call, each `{ email }` or `{ phone }` (email wins; lower-cased). Already-present customers are counted in `skipped`. A computed (filter-based) segment answers `409 conflict` (`details.kind: filter_segment`). The customer does not need an order yet — the key is stored as given.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customers\": [\n    {\n      \"email\": null,\n      \"phone\": null\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove customers from a segment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/segments/{id}/members",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "segments",
                ":id",
                "members"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Remove customers from a segment\n\nRemoves customers (by email or phone key) from a membership segment. Unknown keys are ignored.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customers\": [\n    {\n      \"email\": null,\n      \"phone\": null\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Add an internal note to a customer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Velik-Dry-Run",
                "value": "1",
                "description": "`1` / `true` / `yes` → validate everything, write nothing, respond with `dry_run: true`.",
                "disabled": true
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/customers/{key}/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "customers",
                ":key",
                "notes"
              ],
              "query": [],
              "variable": [
                {
                  "key": "key",
                  "value": "",
                  "description": "Customer key — lower-cased email, else phone (the `key` field of `Customer`). URL-encode it."
                }
              ]
            },
            "description": "Add an internal note to a customer\n\nThe note appears in the merchant's Customers tab. `key` is the customer key from `GET /api/v1/customers` (email, else phone); it is lower-cased. Text ≤ 2000 characters.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"string\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "webhooks",
      "item": [
        {
          "name": "List webhook subscriptions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks"
              ],
              "query": [],
              "variable": []
            },
            "description": "List webhook subscriptions\n\nAll subscriptions of the account with their events, status and the last delivery result. Secrets are never returned here."
          }
        },
        {
          "name": "Create a subscription (secret returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks"
              ],
              "query": [],
              "variable": []
            },
            "description": "Create a subscription (secret returned once)\n\n`url` must be `https://`, without credentials, and must not point at a loopback, private, link-local or\nmetadata address, at `localhost` / `*.local` / `*.internal`, or at velik.ai itself (the hostname is also\nresolved and checked). At least one event. Max 20 subscriptions per account\n(`409 conflict`). The signing `secret` is returned **only** in this response — store it.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"string\",\n  \"events\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Update url / events / description / active",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Update url / events / description / active\n\n`active: true` also clears the \"dead\" notification flag so a recovered endpoint is emailed again on the next failure.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"string\",\n  \"events\": [],\n  \"description\": \"string\",\n  \"active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a subscription (its deliveries go with it)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Delete a subscription (its deliveries go with it)\n\nDeletes the subscription and its delivery history. Pending deliveries stop immediately."
          }
        },
        {
          "name": "Recent deliveries of a subscription",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks/{id}/deliveries?limit=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks",
                ":id",
                "deliveries"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Recent deliveries of a subscription\n\nThe delivery log of one subscription, newest first (`limit` up to 200): status, attempt, HTTP code, next attempt."
          }
        },
        {
          "name": "Send a `test` event and wait for the first attempt",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhooks/{id}/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhooks",
                ":id",
                "test"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Send a `test` event and wait for the first attempt\n\nDelivers `{ event: \"test\", data: { message, webhook_id } }` to this subscription only and returns the first attempt (status code). Inactive subscription → `409 conflict`."
          }
        },
        {
          "name": "Retry a delivery now",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/webhook-deliveries/{id}/retry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "webhook-deliveries",
                ":id",
                "retry"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "UUID. A non-UUID value is `400 validation_failed`; a UUID from another account is `404 not_found`."
                }
              ]
            },
            "description": "Retry a delivery now\n\nRe-sends a `pending`/`failed`/`dead` delivery immediately (same event id, fresh timestamp and signature). Already delivered → `409 conflict`."
          }
        }
      ]
    },
    {
      "name": "MCP",
      "item": [
        {
          "name": "tools/list",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/mcp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "mcp"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/list\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "The tools this key can see (by scope)."
          }
        },
        {
          "name": "tools/call list_orders",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/mcp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "mcp"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"list_orders\",\n    \"arguments\": {\n      \"status\": \"new\",\n      \"limit\": 5\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Same view as GET /api/v1/orders."
          }
        }
      ]
    }
  ]
}
