{
  "opencollection": "1.0.0",
  "info": {
    "name": "SPOD (Spreadconnect) Fulfillment REST API",
    "version": "1.0",
    "description": "Print-on-demand fulfillment API for SPOD (Spreadshirt Print-On-Demand), now branded Spreadconnect. Base URL https://rest.spod.com. Every request must include the X-SPOD-ACCESS-TOKEN header."
  },
  "request": {
    "auth": {
      "type": "apikey",
      "apikey": {
        "key": "X-SPOD-ACCESS-TOKEN",
        "value": "{{accessToken}}",
        "in": "header"
      }
    }
  },
  "items": [
    {
      "info": { "name": "Common", "type": "folder" },
      "items": [
        {
          "info": { "name": "Verify access token", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/authentication" },
          "docs": "Confirms the supplied access token is valid."
        }
      ]
    },
    {
      "info": { "name": "Articles", "type": "folder" },
      "items": [
        {
          "info": { "name": "List articles", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/articles" },
          "docs": "Retrieves all articles, paginated."
        },
        {
          "info": { "name": "Create an article", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/articles", "body": { "type": "json", "data": "{}" } },
          "docs": "Creates a new customizable article by combining a design with a product type and view."
        },
        {
          "info": { "name": "Get an article", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/articles/:articleId", "params": [ { "name": "articleId", "value": "", "type": "path", "description": "The article ID." } ] },
          "docs": "Fetches a specific article by ID."
        },
        {
          "info": { "name": "Delete an article", "type": "http" },
          "http": { "method": "DELETE", "url": "https://rest.spod.com/articles/:articleId", "params": [ { "name": "articleId", "value": "", "type": "path", "description": "The article ID." } ] },
          "docs": "Removes an article."
        }
      ]
    },
    {
      "info": { "name": "Orders", "type": "folder" },
      "items": [
        {
          "info": { "name": "Create an order", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders", "body": { "type": "json", "data": "{}" } },
          "docs": "Creates a new order via the simple (single-request, state CONFIRMED) or controlled create/update/confirm flow."
        },
        {
          "info": { "name": "Get an order", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/orders/:orderId", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Retrieves order information."
        },
        {
          "info": { "name": "Update an order", "type": "http" },
          "http": { "method": "PUT", "url": "https://rest.spod.com/orders/:orderId", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ], "body": { "type": "json", "data": "{}" } },
          "docs": "Modifies an order that has not yet been confirmed."
        },
        {
          "info": { "name": "Confirm an order", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/confirm", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Confirms an order so it enters production."
        },
        {
          "info": { "name": "Cancel an order", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/cancel", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Attempts to cancel an order while it has not yet entered production."
        }
      ]
    },
    {
      "info": { "name": "Shipping", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get available shipping types", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/orders/:orderId/shippingTypes", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Lists shipping types available for an order with price and delivery estimate."
        },
        {
          "info": { "name": "Set shipping type", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/shippingType", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ], "body": { "type": "json", "data": "{\"shippingType\":1}" } },
          "docs": "Sets the preferred shipping type on an order."
        },
        {
          "info": { "name": "Get shipments", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/orders/:orderId/shipments", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Retrieves shipment records and tracking details for an order."
        }
      ]
    },
    {
      "info": { "name": "Product Types", "type": "folder" },
      "items": [
        {
          "info": { "name": "List product types", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/productTypes" },
          "docs": "Lists the catalog of available product types (article types)."
        },
        {
          "info": { "name": "Get a product type", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/productTypes/:productTypeId", "params": [ { "name": "productTypeId", "value": "", "type": "path", "description": "The product type ID." } ] },
          "docs": "Retrieves a product type with sizes, colors, views, and printable areas."
        }
      ]
    },
    {
      "info": { "name": "Stock", "type": "folder" },
      "items": [
        {
          "info": { "name": "List stock for all variants", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/stock" },
          "docs": "Retrieves inventory availability across all product variants."
        },
        {
          "info": { "name": "Get stock for a SKU", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/stock/:sku", "params": [ { "name": "sku", "value": "", "type": "path", "description": "The variant SKU." } ] },
          "docs": "Retrieves stock for a specific variant SKU."
        }
      ]
    },
    {
      "info": { "name": "Subscriptions", "type": "folder" },
      "items": [
        {
          "info": { "name": "List subscriptions", "type": "http" },
          "http": { "method": "GET", "url": "https://rest.spod.com/subscriptions" },
          "docs": "Lists active webhook subscriptions."
        },
        {
          "info": { "name": "Create a subscription", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/subscriptions", "body": { "type": "json", "data": "{\"eventType\":\"Order.processed\",\"url\":\"https://example.com/webhooks/spod\",\"secret\":\"my-webhook-secret\"}" } },
          "docs": "Registers a webhook subscription. Notifications arrive via POST and must be acknowledged with a 202, a response within 8 seconds, and payload [accepted]. With a secret set, notifications carry an X-SPRD-SIGNATURE Base64 SHA256 HMAC header."
        },
        {
          "info": { "name": "Delete a subscription", "type": "http" },
          "http": { "method": "DELETE", "url": "https://rest.spod.com/subscriptions/:subscriptionId", "params": [ { "name": "subscriptionId", "value": "", "type": "path", "description": "The subscription ID." } ] },
          "docs": "Removes a webhook subscription."
        },
        {
          "info": { "name": "Simulate Order.cancelled event", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/simulate/order-cancelled", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Triggers a test Order.cancelled webhook notification (test/staging use)."
        },
        {
          "info": { "name": "Simulate Order.processed event", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/simulate/order-processed", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Triggers a test Order.processed webhook notification (test/staging use)."
        },
        {
          "info": { "name": "Simulate Shipment.sent event", "type": "http" },
          "http": { "method": "POST", "url": "https://rest.spod.com/orders/:orderId/simulate/shipment-sent", "params": [ { "name": "orderId", "value": "", "type": "path", "description": "The order ID." } ] },
          "docs": "Triggers a test Shipment.sent webhook notification (test/staging use)."
        }
      ]
    }
  ]
}
