{
  "openapi": "3.0.0",
  "info": {
    "title": "PrintNow Enterprise API",
    "description": "The PrintNow Enterprise API gives your systems programmatic access to your PrintNow storefronts: integrate with ERP and order management systems, automate fulfillment, keep customer records in sync, run business reports, and receive real-time notifications when orders and customers change.\n\nThe API has two parts, both at `api.printnow.com`:\n\n- a **REST API** (JSON over HTTPS, HTTP Basic authentication) for most operations, under `/api/v2/`;\n- a **cXML endpoint** (`/cxml`) for e-procurement platforms and print MIS systems.\n\n## Quick start\n\n1. In the PrintNow admin, go to **Settings > API Keys** and generate a token/key pair.\n2. Check the pair with the ping endpoint. A `204 No Content` response means your credentials work:\n\n   ```bash\n   curl -u \"YOUR_API_TOKEN:YOUR_API_KEY\" https://api.printnow.com/api/v2/ping\n   ```\n\n3. Find the operations you need in the sections below.\n\n## Base URL\n\n```\nhttps://api.printnow.com/api/v2/\n```\n\nEvery request must use HTTPS; plain HTTP requests are refused.\n\n## Sections\n\n| Section | What it covers |\n|---|---|\n| Authentication | Credentials, the ping check, and authentication errors. |\n| Orders | Read orders, download their print files, and update shipping and status. |\n| Customers | Create, read, update, transfer and delete customer accounts. |\n| Products | Photo Merge renderings: realistic mockups of a product with the customer's design applied. |\n| Storefronts | Storefronts, their order statuses and sales reps, order search, and abandoned carts. |\n| Reports | 14 business reports, from sales and tax to shipping and affiliates. |\n| Webhooks | Subscribe a URL to order and customer events. |\n| cXML | Punchout and order submission for procurement and print MIS systems. |\n\n## Requests and responses\n\n- Send request bodies as JSON with `Content-Type: application/json`. Responses are JSON unless an endpoint returns a file (zip downloads, PNG renderings).\n- A token/key pair works for every storefront in your PrintNow account.\n- Errors return a JSON body with a single `Message`:\n\n  ```json\n  { \"Message\": \"Order not found.\" }\n  ```\n\n| Status | Meaning |\n|---|---|\n| `200 OK` / `201 Created` | Success, with a body. |\n| `204 No Content` | Success, no body. |\n| `400 Bad Request` | A parameter or body field is missing or invalid; `Message` says which. |\n| `401 Unauthorized` | Credentials are missing or invalid, or the request used HTTP. See Authentication. |\n| `403 Forbidden` | Your account doesn't include this section of the API. |\n| `404 Not Found` | The item doesn't exist, or a required query parameter is missing. |\n| `409 Conflict` | The request conflicts with the item's state, such as files that are still being prepared. |\n| `429 Too Many Requests` | The rate limit was exceeded; see below. |\n\n## Rate limit\n\nEach PrintNow account can make **100 calls per 10 seconds**, shared by all of its API keys and the cXML endpoint. Every counted response carries:\n\n| Header | Meaning |\n|---|---|\n| `X-RateLimit-Limit` | Calls allowed per window. |\n| `X-RateLimit-Remaining` | Calls left right now. |\n| `X-RateLimit-Reset` | Seconds until the full allowance is available again. |\n\nOver the limit, the API answers `429 Too Many Requests` with a `Retry-After` header (seconds). Wait that long before calling again. The headers are the authoritative numbers.\n\n## Dates and times\n\n- Query parameters that take a date use `YYYY-MM-DD`.\n- Timestamps in responses are ISO 8601 in UTC (for example `2026-11-06T14:46:12.007Z`) unless a field's description says otherwise.\n\n## Webhooks\n\nInstead of polling, subscribe a URL to an event (`order_created`, `customer_updated`, and so on). PrintNow POSTs the changed order or customer to that URL in the same shape the GET endpoints return. See the Webhooks section.\n",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://api.printnow.com"
    }
  ],
  "paths": {
    "/cxml": {
      "post": {
        "tags": [
          "cXML"
        ],
        "summary": "Handles a cXML ProfileRequest, PunchOutSetupRequest (create or edit) or OrderRequest.",
        "description": "Send the document with Content-Type application/xml and the default namespace http://tempuri.org/cXML.\nThe Sender credential (domain api.printnow.com) carries your API token as the Identity and your API key as\nthe SharedSecret; To is PrintNow's DUNS 157519294; From is the punchout identity configured for the storefront.",
        "operationId": "CXML_HandleCXML",
        "requestBody": {
          "x-name": "cxmlReqEnv",
          "description": "The cXML request envelope.",
          "content": {
            "application/xml": {
              "schema": {
                "type": "string"
              },
              "examples": {
                "OrderRequest": {
                  "value": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd\">\r\n<cXML xml:lang=\"en-US\" payloadID=\"93369535150910.4821@procurement.example.com\" timestamp=\"2000-08-03T08:49:11+07:00\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Header>\r\n        <From>\r\n            <Credential domain=\"NetworkID\">\r\n                <Identity>AN01000000001</Identity>\r\n            </Credential>\r\n        </From>\r\n        <To>\r\n            <Credential domain=\"DUNS\">\r\n                <Identity>157519294</Identity>\r\n            </Credential>\r\n        </To>\r\n        <Sender>\r\n            <Credential domain=\"api.printnow.com\">\r\n                <Identity>YOUR_API_TOKEN</Identity>\r\n                <SharedSecret>YOUR_API_KEY</SharedSecret>\r\n            </Credential>\r\n        </Sender>\r\n    </Header>\r\n    <Request>\r\n        <OrderRequest>\r\n            <OrderRequestHeader orderID=\"DO102880\" orderDate=\"2012-08-03T08:49:09+07:00\" type=\"new\">\r\n                <Contact role=\"endUser\">\r\n                    <Name>Demo User</Name>\r\n                    <Email>demo.user@domain.com</Email>\r\n                </Contact>\r\n                <Total>\r\n                    <Money currency=\"USD\">61608.81</Money>\r\n                </Total>\r\n                <ShipTo>\r\n                    <Address isoCountryCode=\"US\" addressID=\"1000467\">\r\n                        <Name xml:lang=\"en\">Acme, Inc.</Name>\r\n                        <PostalAddress name=\"default\">\r\n                            <DeliverTo>John Q. Smith</DeliverTo>\r\n                            <DeliverTo>Buyers Headquarters</DeliverTo>\r\n                            <Street>123 Main Street</Street>\r\n                            <City>Mountain View</City>\r\n                            <State isoStateCode=\"US-CA\">CA</State>\r\n                            <PostalCode>94089</PostalCode>\r\n                            <Country isoCountryCode=\"US\">United States</Country>\r\n                        </PostalAddress>\r\n                        <Email name=\"default\">john_smith@acme.com</Email>\r\n                        <Phone name=\"work\">\r\n                            <TelephoneNumber>\r\n                                <CountryCode isoCountryCode=\"US\">1</CountryCode>\r\n                                <AreaOrCityCode>800</AreaOrCityCode>\r\n                                <Number>5555555</Number>\r\n                            </TelephoneNumber>\r\n                        </Phone>\r\n                    </Address>\r\n                </ShipTo>\r\n                <BillTo>\r\n                    <Address isoCountryCode=\"US\" addressID=\"12\">\r\n                        <Name xml:lang=\"en\">Acme Accounts Payable</Name>\r\n                        <PostalAddress name=\"default\">\r\n                            <Street>124 Union Street</Street>\r\n                            <City>San Francisco</City>\r\n                            <State isoStateCode=\"US-CA\">CA</State>\r\n                            <PostalCode>94128</PostalCode>\r\n                            <Country isoCountryCode=\"US\">United States</Country>\r\n                        </PostalAddress>\r\n                        <Phone name=\"work\">\r\n                            <TelephoneNumber>\r\n                                <CountryCode isoCountryCode=\"US\">1</CountryCode>\r\n                                <AreaOrCityCode>415</AreaOrCityCode>\r\n                                <Number>6666666</Number>\r\n                            </TelephoneNumber>\r\n                        </Phone>\r\n                    </Address>\r\n                </BillTo>\r\n                <LegalEntity>\r\n                    <IdReference domain=\"CompanyCode\" identifier=\"CH01\">\r\n                        <Description>SAP AG</Description>\r\n                    </IdReference>\r\n                </LegalEntity>\r\n                <OrganizationalUnit>\r\n                    <IdReference domain=\" PurchasingOrganization\" identifier=\"SCP\">\r\n                        <Description> SCPM Purchasing Org </Description>\r\n                    </IdReference>\r\n                </OrganizationalUnit>\r\n                <OrganizationalUnit>\r\n                    <IdReference domain=\" PurchasingGroup\" identifier=\"0001\">\r\n                        <Description> PGP Buyer </Description>\r\n                    </IdReference>\r\n                </OrganizationalUnit>\r\n                <Shipping>\r\n                    <Money currency=\"USD\">10.00</Money>\r\n                    <Description xml:lang=\"en-US\">FedEx 2-day</Description>\r\n                </Shipping>\r\n                <Tax>\r\n                    <Money currency=\"USD\">1.5</Money>\r\n                    <Description xml:lang=\"en\">CA State Tax</Description>\r\n                </Tax>\r\n                <Payment>\r\n                    <PCard number=\"1234567890123456\" expiration=\"2015-03-12\"/>\r\n                </Payment>\r\n            </OrderRequestHeader>\r\n            <ItemOut quantity=\"2\" lineNumber=\"1\">\r\n                <ItemID>\r\n                    <SupplierPartID>5808324</SupplierPartID>\r\n                    <SupplierPartAuxiliaryID>E000028901</SupplierPartAuxiliaryID>\r\n                </ItemID>\r\n                <ItemDetail>\r\n                    <UnitPrice>\r\n                        <Money currency=\"USD\">55.00</Money>\r\n                        <Modifications>\r\n                            <Modification>\r\n                                <OriginalPrice>\r\n                                    <Money currency = \"USD\">50.00</Money>\r\n                                </OriginalPrice>\r\n                                <AdditionalCost>\r\n                                    <Money currency = \"USD\">5</Money>\r\n                                </AdditionalCost>\r\n                                <ModificationDetail endDate = \"2013-11-30T10:15:00-08:00\" name = \"Royalties\" startDate = \"2012-08-03T10:15:00-08:00\">\r\n                                    <Description xml:lang = \"en-US\">Charge for Royalties</Description>\r\n                                </ModificationDetail>\r\n                            </Modification>\r\n                        </Modifications>\r\n                    </UnitPrice>\r\n                    <Description xml:lang=\"en\">Laptop Computer Notebook Pentium® II processor w/AGP, 300 MHz, with 12.1&quot; TFT XGA Display</Description>\r\n                    <UnitOfMeasure>EA</UnitOfMeasure>\r\n                    <Classification domain=\"UNSPSC\">43171801</Classification>\r\n                    <URL>http://www.supplier.com/Punchout.asp</URL>\r\n                    <Extrinsic name=\"ExtDescription\">Enhanced keyboard</Extrinsic>\r\n                </ItemDetail>\r\n                <Distribution>\r\n                    <Accounting name=\"DistributionCharge\">\r\n                        <AccountingSegment id=\"7720\">\r\n                            <Name xml:lang=\"en-US\">Account</Name>\r\n                            <Description xml:lang=\"en-US\">Office Supplies</Description>\r\n                        </AccountingSegment>\r\n                        <AccountingSegment id=\"610\">\r\n                            <Name xml:lang=\"en-US\">Cost Center</Name>\r\n                            <Description xml:lang=\"en-US\">Engineering Management</Description>\r\n                        </AccountingSegment>\r\n                    </Accounting>\r\n                    <Charge>\r\n                        <Money currency=\"USD\">20.00</Money>\r\n                    </Charge>\r\n                </Distribution>\r\n            </ItemOut>\r\n            <ItemOut quantity=\"1\" lineNumber=\"2\">\r\n                <ItemID>\r\n                    <SupplierPartID>5555</SupplierPartID>\r\n                </ItemID>\r\n            </ItemOut>\r\n            <ItemOut quantity=\"1\" lineNumber=\"3\">\r\n                <ItemID>\r\n                    <SupplierPartID>5821</SupplierPartID>\r\n                </ItemID>\r\n                <ItemDetail>\r\n                    <UnitPrice>\r\n                        <Money currency=\"USD\">61522.31</Money>\r\n                    </UnitPrice>\r\n                    <Description>N/A</Description>\r\n                    <UnitOfMeasure>EA</UnitOfMeasure>\r\n                    <Classification domain=\"UNSPSC\">12345678</Classification>\r\n                    <Extrinsic name=\"ConfigId\">3E1F142F-B12A-4BD4-936A-0081BAA3847F</Extrinsic>\r\n                </ItemDetail>\r\n            </ItemOut>\r\n        </OrderRequest>\r\n    </Request>\r\n</cXML>"
                },
                "ProfileRequest": {
                  "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" payloadID=\"933694607118.1869318421@procurement.example.com\" timestamp=\"2023-09-19T14:29:17-04:00\" xml:lang=\"en-US\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Header>\r\n        <From>\r\n            <Credential domain=\"NetworkID\">\r\n                <Identity>AN01000000001</Identity>\r\n            </Credential>\r\n        </From>\r\n        <To>\r\n            <Credential domain=\"DUNS\">\r\n                <Identity>157519294</Identity>\r\n            </Credential>\r\n        </To>\r\n        <Sender>\r\n            <Credential domain=\"api.printnow.com\">\r\n                <Identity>YOUR_API_TOKEN</Identity>\r\n                <SharedSecret>YOUR_API_KEY</SharedSecret>\r\n            </Credential>\r\n        </Sender>\r\n    </Header>\r\n    <Request>\r\n        <ProfileRequest></ProfileRequest>\r\n    </Request>\r\n</cXML>"
                },
                "PunchOutSetupRequest-edit": {
                  "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"e20bee0c-ad05-439e-b800-c39a1e7db07e\" timestamp=\"2023-12-04T08:09:46-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n  <Header>\r\n    <From>\r\n      <Credential domain=\"NetworkID\">\r\n        <Identity>AN01000000001</Identity>\r\n      </Credential>\r\n    </From>\r\n    <To>\r\n      <Credential domain=\"DUNS\">\r\n        <Identity>157519294</Identity>\r\n      </Credential>\r\n    </To>\r\n    <Sender>\r\n      <Credential domain=\"api.printnow.com\">\r\n        <Identity>YOUR_API_TOKEN</Identity>\r\n        <SharedSecret>YOUR_API_KEY</SharedSecret>\r\n      </Credential>\r\n    </Sender>\r\n  </Header>\r\n  <Request>\r\n    <PunchOutSetupRequest operation=\"edit\">\r\n      <BuyerCookie>F6az0rFXEyiZuRnkUkiBbA==</BuyerCookie>\r\n      <Extrinsic name=\"ConfigId\">f0f6afc8-5f97-4c34-93f1-e4a38557c904</Extrinsic>\r\n      <Extrinsic name=\"CategoryId\">5</Extrinsic>\r\n      <Extrinsic name=\"Flow\">category</Extrinsic>\r\n      <BrowserFormPost>\r\n        <URL>https://procurement.example.com/punchout/complete</URL>\r\n      </BrowserFormPost>\r\n      <Contact role=\"endUser\">\r\n        <Name>Demo User</Name>\r\n        <Email>demo.user@domain.com</Email>\r\n      </Contact>\r\n    </PunchOutSetupRequest>\r\n  </Request>\r\n</cXML>"
                },
                "PunchOutSetupRequest": {
                  "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"e20bee0c-ad05-439e-b800-c39a1e7db07e\" timestamp=\"2023-12-04T08:09:46-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n  <Header>\r\n    <From>\r\n      <Credential domain=\"NetworkID\">\r\n        <Identity>AN01000000001</Identity>\r\n      </Credential>\r\n    </From>\r\n    <To>\r\n      <Credential domain=\"DUNS\">\r\n        <Identity>157519294</Identity>\r\n      </Credential>\r\n    </To>\r\n    <Sender>\r\n      <Credential domain=\"api.printnow.com\">\r\n        <Identity>YOUR_API_TOKEN</Identity>\r\n        <SharedSecret>YOUR_API_KEY</SharedSecret>\r\n      </Credential>\r\n    </Sender>\r\n  </Header>\r\n  <Request>\r\n    <PunchOutSetupRequest operation=\"create\">\r\n      <BuyerCookie>F6az0rFXEyiZuRnkUkiBbA==</BuyerCookie>\r\n      <Extrinsic name=\"CategoryId\">5</Extrinsic>\r\n      <Extrinsic name=\"Flow\">category</Extrinsic>\r\n      <BrowserFormPost>\r\n        <URL>https://procurement.example.com/punchout/complete</URL>\r\n      </BrowserFormPost>\r\n      <Contact role=\"endUser\">\r\n        <Name>Demo User</Name>\r\n        <Email>demo.user@domain.com</Email>\r\n      </Contact>\r\n    </PunchOutSetupRequest>\r\n  </Request>\r\n</cXML>"
                }
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "A cXML response envelope. Its Status code is the outcome: 200 OK; 400 invalid request (an unknown EditorParam extrinsic, a product/category mismatch, a missing or invalid ConfigId on edit, or a customer that could not be created); 401 bad credentials; 403 the license does not include cXML; 404 no punchout session for the ConfigId on edit; 406 not a cXML document; 415 Content-Type is not application/xml; 429 rate limit exceeded; 501 request type or operation not supported.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "OrderRequest.401": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368633753082368.5436.1559214762@api.printnow.com\" timestamp=\"2023-11-29T14:02:55-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"401\" text=\"Unauthorized\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "OrderRequest.403": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368633141520755.5436.608922002@api.printnow.com\" timestamp=\"2023-11-29T14:01:54-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"403\" text=\"Your license does not include the cXML API.\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "OrderRequest.429": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368633141520755.5436.608922003@api.printnow.com\" timestamp=\"2023-11-29T14:01:54-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"429\" text=\"Rate limit exceeded: 100 calls per 10 seconds.\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "OrderRequest": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368632622940992.5436.658756832@api.printnow.com\" timestamp=\"2023-11-29T14:01:02-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"200\" text=\"OK\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "ProfileRequest.401": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368633141520755.5436.608922001@api.printnow.com\" timestamp=\"2023-11-29T14:01:54-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"401\" text=\"Unauthorized\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "ProfileRequest": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638368613501393840.17584.1304980541@api.printnow.com\" timestamp=\"2023-11-29T13:29:10-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"200\" text=\"OK\" />\r\n        <ProfileResponse effectiveDate=\"2023-11-29T13:29:09-05:00\">\r\n            <Transaction requestName=\"PunchOutSetupRequest\">\r\n                <URL>https://api.printnow.com/cxml</URL>\r\n                <Option name=\"operationAllowed\">create edit</Option>\r\n                <Option name=\"UsePricing\">1</Option>\r\n                <Option name=\"ItemNumber\">1</Option>\r\n                <Option name=\"ModelNumber\">1</Option>\r\n                <Option name=\"IntegrationId\">1</Option>\r\n            </Transaction>\r\n        </ProfileResponse>\r\n    </Response>\r\n</cXML>"
                  },
                  "PunchOutSetupRequest-edit.401": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638372777536888523.14772.1798363624@api.printnow.com\" timestamp=\"2023-12-04T09:09:13-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"401\" text=\"Unauthorized\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "PunchOutSetupRequest-edit": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638372772252084754.21760.1922554227@api.printnow.com\" timestamp=\"2023-12-04T09:00:25-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"200\" text=\"OK\" />\r\n        <PunchOutSetupResponse>\r\n            <StartPage>\r\n                <URL>https://storefront-domain.com/punchout.aspx?uid=f0f6afc8-5f97-4c34-93f1-e4a38557c904</URL>\r\n            </StartPage>\r\n        </PunchOutSetupResponse>\r\n    </Response>\r\n</cXML>"
                  },
                  "PunchOutSetupRequest.401": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638372777536888523.14772.1798363624@api.printnow.com\" timestamp=\"2023-12-04T09:09:13-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"401\" text=\"Unauthorized\" />\r\n    </Response>\r\n</cXML>"
                  },
                  "PunchOutSetupRequest": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.059/cXML.dtd\">\r\n<cXML xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" payloadID=\"638372772252084754.21760.1922554227@api.printnow.com\" timestamp=\"2023-12-04T09:00:25-05:00\" xmlns=\"http://tempuri.org/cXML\">\r\n    <Response>\r\n        <Status code=\"200\" text=\"OK\" />\r\n        <PunchOutSetupResponse>\r\n            <StartPage>\r\n                <URL>https://storefront-domain.com/punchout.aspx?uid=f0f6afc8-5f97-4c34-93f1-e4a38557c904</URL>\r\n            </StartPage>\r\n        </PunchOutSetupResponse>\r\n    </Response>\r\n</cXML>"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/customer/{customerId}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get a customer",
        "description": "Returns the customer, including temporary customers (is_temporary is true). Deleted customers are not found.",
        "operationId": "CustomerV2_GetCustomer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerV2"
                },
                "examples": {
                  "default": {
                    "value": {
                      "storefront": "Demo Store",
                      "storefront_id": 1,
                      "id": 24,
                      "first_name": "Demo",
                      "last_name": "User",
                      "email": "demo.user@domain.com",
                      "username": "demouser",
                      "receive_marketing_emails": true,
                      "last_logged_in_on": "2023-10-18T13:43:19.15Z",
                      "created_on": "2021-08-30T13:34:44.62Z",
                      "last_updated_on": "2023-11-22T15:59:38.667Z",
                      "company": "Demo Company",
                      "organization": null,
                      "user_groups": [],
                      "tax_exempt": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Customer not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Update a customer",
        "description": "For a permanent customer: changes the password, first_name, last_name and company you send; other fields are ignored. Fires the customer_updated webhook.\n\nFor a temporary customer: converts it into a permanent customer. Send the same fields as creating one; the customer keeps its id and saved work. Fires the customer_created webhook. A temporary customer can't be updated while staying temporary (400).\n\nReturns the updated customer.",
        "operationId": "CustomerV2_UpdateCustomer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "data",
          "description": "The fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CustomerV2"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "first_name": "John",
                    "last_name": "Doe",
                    "password": "Password!123",
                    "company": "John Doe, Inc."
                  }
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerV2"
                },
                "examples": {
                  "default": {
                    "value": {
                      "storefront": "Demo Store",
                      "storefront_id": 1,
                      "id": 106670,
                      "first_name": "John",
                      "last_name": "Doe",
                      "email": "john.doe@john-doe-inc.com",
                      "username": "john.doe",
                      "receive_marketing_emails": false,
                      "last_logged_in_on": null,
                      "created_on": "2023-11-30T16:25:44.627Z",
                      "last_updated_on": "2023-11-30T16:26:57.9851105Z",
                      "company": "John Doe, Inc.",
                      "organization": null,
                      "user_groups": [],
                      "tax_exempt": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "No customer data, a field is invalid, the username or email is already in use, or the customer is temporary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Customer Not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete a customer",
        "description": "Marks a permanent customer deleted (their orders stay). Temporary customers can't be deleted (404). Fires the customer_deleted webhook with the customer's last state.",
        "operationId": "CustomerV2_DeleteCustomer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "description": "Customer id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "204": {
            "description": "The customer was deleted.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Customer not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/customer": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Create a customer",
        "description": "Creates a permanent customer from storefront_id, username, password, email, first_name and last_name (company and receive_marketing_emails are optional), and fires the customer_created webhook.\n\nTo create a temporary (guest) customer instead, send only storefront_id and is_temporary: true. PrintNow generates the username, password and email; no webhook fires. Returns the new customer.",
        "operationId": "CustomerV2_CreateCustomer",
        "requestBody": {
          "x-name": "data",
          "description": "The customer to create.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CustomerV2"
                  }
                ]
              },
              "examples": {
                "create-customer": {
                  "value": {
                    "storefront_id": 1,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john.doe@john-doe-inc.com",
                    "username": "john.doe",
                    "password": "Password!123",
                    "company": "John Doe, Inc."
                  }
                },
                "create-temp-customer": {
                  "value": {
                    "storefront_id": 1,
                    "is_temporary": true
                  }
                }
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerV2"
                },
                "examples": {
                  "create-temp-customer": {
                    "summary": "Create Temp Customer: Success",
                    "value": {
                      "storefront": "Demo Store",
                      "storefront_id": 1,
                      "id": 106669,
                      "first_name": "temporary",
                      "last_name": "user",
                      "email": "44260566620b47b88ebf9d617af953a3@ca72a72f460c4050a5fa0f96449711e5.com",
                      "username": "44260566620b47b88ebf9d617af953a3",
                      "receive_marketing_emails": false,
                      "last_logged_in_on": null,
                      "created_on": "2023-11-30T16:23:59.353Z",
                      "last_updated_on": null,
                      "company": null,
                      "organization": null,
                      "user_groups": [],
                      "tax_exempt": false,
                      "is_temporary": true
                    }
                  },
                  "default": {
                    "value": {
                      "storefront": "Demo Store",
                      "storefront_id": 1,
                      "id": 106670,
                      "first_name": "John",
                      "last_name": "Doe",
                      "email": "john.doe@john-doe-inc.com",
                      "username": "john.doe",
                      "receive_marketing_emails": false,
                      "last_logged_in_on": null,
                      "created_on": "2023-11-30T16:25:44.627Z",
                      "last_updated_on": null,
                      "company": "John Doe, Inc.",
                      "organization": null,
                      "user_groups": [],
                      "tax_exempt": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The storefront id is not valid, a required field is missing or invalid (username, email, password, first or last name), or the username or email is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "duplicate-email": {
                    "summary": "Duplicate Email",
                    "value": {
                      "Message": "Email address is already in use."
                    }
                  },
                  "duplicate-username": {
                    "summary": "Duplicate username",
                    "value": {
                      "Message": "Username is already in use."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/customer/{customerId}/transfer": {
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Transfer a temporary customer's work",
        "description": "Moves a temporary customer's image albums, saved projects and punchout sessions to an existing permanent customer on the same storefront. Use it when a guest logs in to an account they already have. Returns the destination customer.",
        "operationId": "CustomerV2_TransferCustomer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "description": "Id of the temporary customer (the source).",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "data",
          "description": "The destination customer: only id is used.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CustomerV2"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "id": 12345
                  }
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerV2"
                },
                "examples": {
                  "default": {
                    "value": {
                      "storefront": "Demo Store",
                      "storefront_id": 1,
                      "id": 24,
                      "first_name": "Demo",
                      "last_name": "User",
                      "email": "demo.user@domain.com",
                      "username": "demouser",
                      "receive_marketing_emails": true,
                      "last_logged_in_on": "2023-10-18T13:43:19.15Z",
                      "created_on": "2021-08-30T13:34:44.62Z",
                      "last_updated_on": "2023-11-22T15:59:38.667Z",
                      "company": "Demo Company",
                      "organization": null,
                      "user_groups": [],
                      "tax_exempt": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The destination customer is missing, or the two customers are in different storefronts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Source or destination customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/hooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook subscriptions",
        "description": "Returns the active subscriptions created with the API key you're calling with. Each key has its own subscriptions.",
        "operationId": "HooksV2_GetHooks",
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookEntry"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "id": 1,
                        "target_url": "https://www.domain.com/new-customer",
                        "event": "customer_created"
                      },
                      {
                        "id": 2,
                        "target_url": "https://www.domain.com/new-order",
                        "event": "order_created"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Subscribe a URL to an event",
        "description": "From now on, each time the event happens PrintNow POSTs a JSON array with the changed order or customer to target_url (see the callbacks). A URL can be subscribed once per API key, so use a different URL for each event.",
        "operationId": "HooksV2_AddHook",
        "requestBody": {
          "x-name": "subscription",
          "description": "The target URL and the event.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/HookSubscription"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "target_url": "https://www.domain.com/callback1.aspx",
                    "event": "order_created"
                  }
                }
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "201": {
            "description": "The subscription was created.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEntry"
                },
                "examples": {
                  "default": {
                    "value": {
                      "id": 6,
                      "target_url": "https://www.domain.com/callback.aspx",
                      "event": "order_created"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The body, target URL or event is missing, the event is unknown, or the target URL is not publicly routable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "invalid-event": {
                    "summary": "Invalid Event",
                    "value": {
                      "Message": "Event name is invalid."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A subscription for this target URL already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "duplicate-target-url": {
                    "summary": "Duplicate Target Url",
                    "value": {
                      "Message": "Target url already exists."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "callbacks": {
          "order_created": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "order_created",
                "description": "An order is placed on a storefront. PrintNow POSTs a JSON array with one OrderV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/OrderV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          },
          "order_updated": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "order_updated",
                "description": "An order changes in the storefront, the admin or the API: for example its status, shipping or items. PrintNow POSTs a JSON array with one OrderV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/OrderV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          },
          "order_deleted": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "order_deleted",
                "description": "An order is deleted in the admin. The payload is the order's last state. PrintNow POSTs a JSON array with one OrderV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/OrderV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          },
          "customer_created": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "customer_created",
                "description": "A customer account is created: storefront registration, the admin, the API, or a guest converted to an account. PrintNow POSTs a JSON array with one CustomerV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/CustomerV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          },
          "customer_updated": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "customer_updated",
                "description": "A customer's profile changes in the storefront, the admin or the API. PrintNow POSTs a JSON array with one CustomerV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/CustomerV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          },
          "customer_deleted": {
            "{$request.body#/target_url}": {
              "post": {
                "summary": "customer_deleted",
                "description": "A customer is deleted through the API. The payload is the customer's last state. PrintNow POSTs a JSON array with one CustomerV2 to the subscription's target_url.",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/CustomerV2"
                        }
                      }
                    }
                  },
                  "required": true
                },
                "responses": {
                  "200": {
                    "description": "Any 2xx response acknowledges the event."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/hooks/{id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Unsubscribe",
        "description": "Stops the subscription. Only subscriptions created with the API key you're calling with can be removed.",
        "operationId": "HooksV2_RemoveHook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Subscription id, from the subscribe response or the list.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "204": {
            "description": "The subscription was removed.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Hook not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get an order",
        "description": "Returns the full order: customer, addresses, payment, line items with their options, shipments and checkout fields.",
        "operationId": "OrderV2_GetOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderV2"
                },
                "examples": {
                  "default": {
                    "value": {
                      "storefront": "Demo Store",
                      "id": 1053,
                      "is_archived": false,
                      "is_deleted": false,
                      "integration_id": null,
                      "status": "Beginning",
                      "customer": {
                        "storefront": "Demo Store",
                        "storefront_id": 1,
                        "id": 24,
                        "first_name": "Demo",
                        "last_name": "User",
                        "email": "demo.user@domain.com",
                        "username": "demouser",
                        "receive_marketing_emails": true,
                        "last_logged_in_on": "2026-11-16T15:01:16.62Z",
                        "created_on": "2021-08-30T13:34:44.62Z",
                        "last_updated_on": "2026-10-01T18:04:43.75Z",
                        "company": "Demo Company",
                        "organization": null,
                        "user_groups": [],
                        "tax_exempt": false
                      },
                      "shipping_address": {
                        "id": 14438,
                        "name": "Default",
                        "company": "",
                        "first_name": "John",
                        "last_name": "Doe",
                        "line_1": "123 Main St.",
                        "line_2": "Apt. B1",
                        "line_3": null,
                        "line_4": null,
                        "city": "Springfield",
                        "state": "MA",
                        "postal_code": "01103",
                        "phone": "555-123-4567",
                        "email": "demo@demostore.com",
                        "country_code": "US",
                        "is_residential": true
                      },
                      "billing_address": {
                        "id": 14438,
                        "name": "Default",
                        "company": "",
                        "first_name": "John",
                        "last_name": "Doe",
                        "line_1": "123 Main St.",
                        "line_2": "Apt. B1",
                        "line_3": null,
                        "line_4": null,
                        "city": "Springfield",
                        "state": "MA",
                        "postal_code": "01103",
                        "phone": "555-123-4567",
                        "email": "demo@demostore.com",
                        "country_code": "US",
                        "is_residential": true
                      },
                      "payment_creditcard": false,
                      "payment_check": false,
                      "payment_cod": false,
                      "payment_po": false,
                      "payment_invoice": true,
                      "payment_paypal": false,
                      "payment_reference": null,
                      "payment_avscode": null,
                      "payment_cvcode": null,
                      "card_type": null,
                      "card_number": null,
                      "check_number": null,
                      "po_number": null,
                      "invoice_number": "448",
                      "tax_total": 0.0,
                      "shipping_total": 12.5,
                      "sub_total": 10.0,
                      "promotion_total": 0.0,
                      "promotion_code": null,
                      "created_on": "2026-10-26T14:16:02.027Z",
                      "shipped_on": null,
                      "shipping_provider": "UPS",
                      "shipping_service": "UPS Ground",
                      "items": [
                        {
                          "id": 1468,
                          "sub_total": 10.0,
                          "created_on": "2026-10-26T14:15:34.897Z",
                          "status": "Beginning",
                          "quantity": 1,
                          "due_on": null,
                          "weight": 0.0,
                          "base_price": 10.0,
                          "options_price": 0.0,
                          "markup_price": 0.0,
                          "image_fee": 0.0,
                          "download_fee": 0.0,
                          "integration_id": "presswise-10001",
                          "product_id": 9840,
                          "item_number": "",
                          "model_number": "",
                          "name": "Shipping Box Dieline",
                          "vendor": null,
                          "options": [
                            {
                              "name": "Printed Sides",
                              "value": "Outside Only",
                              "option_integration_id": null,
                              "value_integration_id": null
                            },
                            {
                              "name": "Size",
                              "value": "Custom",
                              "option_integration_id": null,
                              "value_integration_id": null
                            }
                          ],
                          "notes": "",
                          "parametric": [
                            {
                              "name": "blankWidth",
                              "value": "26.7500"
                            },
                            {
                              "name": "blankHeight",
                              "value": "13.3750"
                            }
                          ],
                          "reorder_ref": null,
                          "shipment_index": 1
                        }
                      ],
                      "shipments": [
                        {
                          "index": 1,
                          "provider": "UPS",
                          "service": "UPS Ground",
                          "shipping_total": 12.5,
                          "tax_total": 0.0,
                          "tracking_numbers": "1Z999AA10123456784",
                          "shipped_on": "2026-11-06T14:46:12.007Z",
                          "ship_to_address": {
                            "id": 14438,
                            "name": "Default",
                            "company": "",
                            "first_name": "John",
                            "last_name": "Doe",
                            "line_1": "123 Main St.",
                            "line_2": "Apt. B1",
                            "line_3": null,
                            "line_4": null,
                            "city": "Springfield",
                            "state": "MA",
                            "postal_code": "01103",
                            "phone": "555-123-4567",
                            "email": "demo@demostore.com",
                            "country_code": "US",
                            "is_residential": true
                          }
                        }
                      ],
                      "checkout_fields": [
                        {
                          "name": "Cost Center",
                          "value": "asd"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/download": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Download an order's print files",
        "description": "Returns a zip (order-{orderId}.zip) with the print-ready files of every item. Files are available once every item has finished merging; until then the response is 409 with a Retry-After header (60 seconds).",
        "operationId": "OrderV2_DownloadOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "A zip of the order's print files.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Not every item has finished merging yet; try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "All items have not completed merge process."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/download/{itemId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Download an item's print files",
        "description": "Returns a zip (item-{itemId}.zip) with the item's print-ready files. Until the item has finished merging the response is 409 with a Retry-After header (30 seconds).",
        "operationId": "OrderV2_DownloadItem",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "description": "Line item id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "A zip of the item's print files.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Order or item not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Item not found."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The item has not finished merging yet; try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Item has not completed merge process."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/assets/{itemId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Download an item's source assets",
        "description": "Returns a zip (item-assets-{itemId}.zip) with the item's source files: the files the customer uploaded for a custom-design product, or the high-resolution images used in an editor design.",
        "operationId": "OrderV2_DownloadItemAssets",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "description": "Line item id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "A zip of the item's uploaded assets.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Order or item not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Item not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/shipped": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "summary": "Mark an order shipped",
        "description": "Sets every item to the storefront's shipped status (the status that sends the \"Order Shipped\" email), records the shipped date on the order and on every shipment, sends the Order Shipped email to the customer, and fires the order_updated webhook.\n\nThe body is optional. A tracking number is added to the order's and every shipment's tracking numbers; duplicates are ignored.",
        "operationId": "OrderV2_OrderShipped",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "tracking",
          "description": "Optional tracking number.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TrackingInfo"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "tracking_number": "Z1234567890"
                  }
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "204": {
            "description": "The order was marked shipped.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "The store has no Shipped order status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/shipped/{itemId}": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "summary": "Mark an item shipped",
        "description": "Like marking the order shipped, but only for this item and the shipment it belongs to; the order's other shipments are unchanged. This is how to ship one destination of a split-shipping order. Sends the Order Shipped email for this item and fires the order_updated webhook.",
        "operationId": "OrderV2_OrderItemShipped",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "description": "Line item id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "requestBody": {
          "x-name": "tracking",
          "description": "Optional tracking number.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TrackingInfo"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "tracking_number": "Z1234567890"
                  }
                }
              }
            }
          },
          "x-position": 3
        },
        "responses": {
          "204": {
            "description": "The item was marked shipped.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "The item does not belong to the order, or the store has no Shipped order status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order or line item not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/status": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "summary": "Set an order's status",
        "description": "Sets every item to the given status (any status on the storefront, matched by name) and adds an order history entry with your comments, initials and an \"Updated via API\" note. Optionally adds a tracking number, emails the customer and emails the vendors. When the status is the storefront's shipped status, the order's shipped date is set too. Fires the order_updated webhook.",
        "operationId": "OrderV2_OrderStatusChange",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "status",
          "description": "The status to set, with optional comments, tracking number and notifications.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/StatusInfoV2"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "order_status": "In Progress",
                    "comments": "",
                    "tracking_number": "",
                    "user_initials": "",
                    "notify_customer": false,
                    "notify_vendor": false
                  }
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "204": {
            "description": "The order's status was changed.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "Status information is missing, or the status does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/order/{orderId}/status/{itemId}": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "summary": "Set an item's status",
        "description": "Like setting the order's status, but only for this item.",
        "operationId": "OrderV2_OrderItemStatusChange",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "Order id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "description": "Line item id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "requestBody": {
          "x-name": "status",
          "description": "The status to set, with optional comments, tracking number and notifications.",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/StatusInfoV2"
                  }
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "order_status": "In Progress",
                    "comments": "",
                    "tracking_number": "",
                    "user_initials": "",
                    "notify_customer": false,
                    "notify_vendor": false
                  }
                }
              }
            }
          },
          "x-position": 3
        },
        "responses": {
          "204": {
            "description": "The item's status was changed.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "Status information is missing, the status does not exist, or the item does not belong to the order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order or line item not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Order not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/ping": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "A test call to ensure that your API credentials are working correctly.",
        "operationId": "PingV2_GetPing",
        "responses": {
          "204": {
            "description": "Your key and token work.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/product/{productId}/renderings": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "List a product's renderings",
        "description": "Returns the product's Photo Merge renderings: realistic mockup images of the product. 404 when the product doesn't exist or has no renderings.",
        "operationId": "ProductV2_GetProductRenderings",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "description": "Product id (an order item's product_id).",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductRendering"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "id": 22,
                        "name": "Front"
                      },
                      {
                        "id": 23,
                        "name": "Angled"
                      },
                      {
                        "id": 24,
                        "name": "ARView"
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product renderings not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Product renderings not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/product/{productId}/renderings/{renderingId}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Download a rendering image",
        "description": "Returns the rendering as a PNG attachment named after the rendering. 404 when the product, the rendering or its image file doesn't exist.",
        "operationId": "ProductV2_DownloadProductRendering",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "description": "Product id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "renderingId",
            "in": "path",
            "required": true,
            "description": "Rendering id, from the product's rendering list.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "The rendering as a PNG image.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Product rendering not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Product rendering not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/sales": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Sales report",
        "description": "Customers, orders, average order and sales per storefront.",
        "operationId": "ReportV2_SalesReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront": "Demo Store",
                        "user_count": 247,
                        "order_count": 683,
                        "order_average": 269.2221,
                        "order_total": 183878.7
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/tax": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Tax report",
        "description": "One row per order with its ship-to country and state and its subtotal, shipping, discount, tax and total.",
        "operationId": "ReportV2_TaxReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "order_id": 406,
                        "order_date": "2018-09-07T14:48:52.767",
                        "country": "IE",
                        "state": "",
                        "sub_total": 0.5,
                        "shipping_total": 106.09,
                        "promotion_total": 0.0,
                        "tax_total": 21.32,
                        "grand_total": 127.91,
                        "group_by_key": ", Ireland"
                      },
                      {
                        "order_id": 698,
                        "order_date": "2021-12-07T08:57:57.937",
                        "country": "CA",
                        "state": "AB",
                        "sub_total": 293.5,
                        "shipping_total": 28.02,
                        "promotion_total": 0.0,
                        "tax_total": 9.7,
                        "grand_total": 331.22,
                        "group_by_key": "AB, Canada"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/order": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Order report",
        "description": "Orders, items, sales, tax and shipping per day, month or year (viewBy).",
        "operationId": "ReportV2_OrderReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          },
          {
            "name": "viewBy",
            "in": "query",
            "description": "Group rows by day (default), month or year.",
            "schema": {
              "type": "string",
              "default": "day",
              "nullable": true
            },
            "x-position": 4
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "period": "1/2/2018",
                        "order_count": 1,
                        "item_count": 1,
                        "order_total": 148.0,
                        "tax_total": 9.25,
                        "shipping_total": 0.0
                      },
                      {
                        "period": "1/31/2018",
                        "order_count": 1,
                        "item_count": 3,
                        "order_total": 444.0,
                        "tax_total": 27.75,
                        "shipping_total": 0.0
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/order_details": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Order details report",
        "description": "One row per order with the customer, addresses, sales rep, totals, shipping, tracking and status.",
        "operationId": "ReportV2_OrderDetailsReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetailsReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "order_id": 385,
                        "customer_email": "demo.user@domain.com",
                        "billing_address": "Demo Company\r\nJohn Doe\r\n123 Main St.\r\nSuite 200\r\nSpringfield MA 01103\r\nUS\r\n555-123-4567\r\ndemo@demostore.com",
                        "shipping_address": "Demo Company\r\nJohn Doe\r\n123 Main St.\r\nSuite 200\r\nSpringfield MA 01103\r\nUS\r\n555-123-4567\r\ndemo@demostore.com",
                        "order_date": "2018-01-02T11:50:04.62",
                        "store_url": "demostore.com",
                        "sales_rep": null,
                        "sub_total": 148.0,
                        "shipping_total": 0.0,
                        "promotion_total": 0.0,
                        "tax_total": 9.25,
                        "grand_total": 157.25,
                        "promotion_code": "",
                        "shipping_provider": "UPS",
                        "shipping_method": "UPS Second Day Air",
                        "tracking_numbers": null,
                        "invoice_number": null,
                        "order_status": "Beginning",
                        "company": "Demo Company",
                        "user_group": ""
                      },
                      {
                        "order_id": 386,
                        "customer_email": "demo.user@domain.com",
                        "billing_address": "Demo Company\r\nJohn Doe\r\n123 Main St.\r\nSuite 200\r\nSpringfield MA 01103\r\nUS\r\n555-123-4567\r\ndemo@demostore.com",
                        "shipping_address": "Demo Company\r\nJohn Doe\r\n123 Main St.\r\nSuite 200\r\nSpringfield MA 01103\r\nUS\r\n555-123-4567\r\ndemo@demostore.com",
                        "order_date": "2018-01-02T11:56:03.777",
                        "store_url": "demostore.com",
                        "sales_rep": null,
                        "sub_total": 148.0,
                        "shipping_total": 0.0,
                        "promotion_total": 0.0,
                        "tax_total": 9.25,
                        "grand_total": 157.25,
                        "promotion_code": "",
                        "shipping_provider": "UPS",
                        "shipping_method": "UPS Second Day Air",
                        "tracking_numbers": null,
                        "invoice_number": null,
                        "order_status": "Beginning",
                        "company": "Demo Company",
                        "user_group": ""
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/order_item_details": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Order item details report",
        "description": "One row per line item with the customer, product, quantity, total, ship-to address and shipping.",
        "operationId": "ReportV2_OrderItemDetailsReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderItemDetailsReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "order_id": 385,
                        "order_date": "1/2/2018",
                        "customer_company": "Demo Company",
                        "customer_name": "Demo User",
                        "customer_username": "demouser",
                        "item_id": 509,
                        "item_status": "Beginning",
                        "product_name": "Static Product",
                        "product_item_number": "104",
                        "product_model_number": "static-product-2",
                        "quantity": 250,
                        "item_total": 148.0,
                        "shipping_address_line_1": "123 Main St.",
                        "shipping_address_line_2": "Suite 200",
                        "shipping_address_line_3": "",
                        "shipping_address_line_4": "",
                        "shipping_address_city": "Springfield",
                        "shipping_address_state": "MA",
                        "shipping_address_postal_code": "01103",
                        "shipping_method": "UPS Second Day Air",
                        "shipping_provider": "UPS",
                        "shipped_on": null,
                        "tracking_numbers": null,
                        "shipping_total": 0.0,
                        "customer_user_groups": ""
                      },
                      {
                        "order_id": 386,
                        "order_date": "1/2/2018",
                        "customer_company": "Demo Company",
                        "customer_name": "Demo User",
                        "customer_username": "demouser",
                        "item_id": 510,
                        "item_status": "Beginning",
                        "product_name": "Static Product",
                        "product_item_number": "104",
                        "product_model_number": "static-product-2",
                        "quantity": 250,
                        "item_total": 148.0,
                        "shipping_address_line_1": "123 Main St.",
                        "shipping_address_line_2": "Suite 200",
                        "shipping_address_line_3": "",
                        "shipping_address_line_4": "",
                        "shipping_address_city": "Springfield",
                        "shipping_address_state": "MA",
                        "shipping_address_postal_code": "01103",
                        "shipping_method": "UPS Second Day Air",
                        "shipping_provider": "UPS",
                        "shipped_on": null,
                        "tracking_numbers": null,
                        "shipping_total": 0.0,
                        "customer_user_groups": ""
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/product_sales": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Product sales report",
        "description": "Units, orders and sales per product.",
        "operationId": "ReportV2_ProductSalesReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductSalesReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "product_id": 0,
                        "category_name": "Business Cards",
                        "product_name": "3.5\" × 3.5\" Custom Upload ",
                        "quantity": 10000,
                        "order_count": 1,
                        "sales_total": 100000000.0
                      },
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "product_id": 18,
                        "category_name": "Test Business Cards",
                        "product_name": "Test Business Card 4",
                        "quantity": 72950,
                        "order_count": 135,
                        "sales_total": 65235.2733
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/promotion_code": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Promotion code report",
        "description": "Orders and discount total per promotion code.",
        "operationId": "ReportV2_PromotionCodeReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromotionCodeReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "code": "100OFF4ME",
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "description": "",
                        "expiration": "",
                        "order_count": 5,
                        "discount_total": 4779.85
                      },
                      {
                        "code": "DISTPROOF",
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "description": "Ground shipping",
                        "expiration": "",
                        "order_count": 2,
                        "discount_total": 149.85
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/customer_list": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Customer list report",
        "description": "Customers with their account details and their orders and sales in the date range.",
        "operationId": "ReportV2_CustomerListReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerListReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "customer_id": 24,
                        "customer_company": "Demo Company",
                        "customer_first_name": "Demo",
                        "customer_last_name": "User",
                        "customer_email": "demo.user@domain.com",
                        "customer_username": "demouser",
                        "customer_last_login_on": "2026-11-16T10:01:16.62",
                        "customer_created_on": "2021-08-30T09:34:44.62",
                        "order_count": 740,
                        "sales_total": 119426161.5524,
                        "customer_marketing_emails": true
                      },
                      {
                        "storefront_id": 2,
                        "storefront": "Storefront : B2B",
                        "customer_id": 180946,
                        "customer_company": null,
                        "customer_first_name": "Demo",
                        "customer_last_name": "User",
                        "customer_email": "demo.user@domain.com",
                        "customer_username": "5e46d0c5cf63514f8fca00f718c0f42e",
                        "customer_last_login_on": null,
                        "customer_created_on": "2024-11-05T09:29:48.097",
                        "order_count": 8,
                        "sales_total": 692.0,
                        "customer_marketing_emails": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/customer_sales": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Customer sales report",
        "description": "Orders and sales per customer in the date range.",
        "operationId": "ReportV2_CustomerSalesReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerSalesReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "customer_id": 24,
                        "customer_company": "Demo Company",
                        "customer_first_name": "Demo",
                        "customer_last_name": "User",
                        "customer_email": "demo.user@domain.com",
                        "customer_username": "demouser",
                        "customer_last_login_on": "11/16/2026",
                        "customer_created_on": "8/30/2021",
                        "order_count": 480,
                        "sales_total": 118390085.8424
                      },
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "customer_id": 53141,
                        "customer_company": "",
                        "customer_first_name": "Jane",
                        "customer_last_name": "Smith",
                        "customer_email": "jane.smith@domain.com",
                        "customer_username": "jsmith",
                        "customer_last_login_on": "7/23/2014",
                        "customer_created_on": "7/23/2014",
                        "order_count": 2,
                        "sales_total": 1632.71
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/shipping": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Shipping report",
        "description": "Orders and shipping charges per carrier and service.",
        "operationId": "ReportV2_ShippingReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShippingReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "provider": "USPS",
                        "description": "U.S.P.S Priority Mail™",
                        "shipping_total": 1154.1,
                        "order_count": 87
                      },
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "provider": "FIXED",
                        "description": "No Cost Shipping",
                        "shipping_total": 0.0,
                        "order_count": 78
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/sales_rep": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Sales rep report",
        "description": "Orders, average order and sales per sales rep.",
        "operationId": "ReportV2_SalesRepReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesRepReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "sales_rep_id": 51516,
                        "sales_rep_name": "Demo Approver",
                        "order_count": 2,
                        "order_average": 339358.86,
                        "order_total": 678717.72
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/saved_projects": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Saved projects report",
        "description": "Number of saved projects per customer.",
        "operationId": "ReportV2_SavedProjectsReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SavedProjectReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "customer_id": 24,
                        "customer_company": "Demo Company",
                        "customer_first_name": "Demo",
                        "customer_last_name": "User",
                        "customer_email": "demo.user@domain.com",
                        "customer_username": "demouser",
                        "project_count": 1143
                      },
                      {
                        "storefront_id": 1,
                        "storefront": "Storefront : Demo Store",
                        "customer_id": 53508,
                        "customer_company": "",
                        "customer_first_name": "Sam",
                        "customer_last_name": "Lee",
                        "customer_email": "sam.lee@domain.com",
                        "customer_username": "Lee",
                        "project_count": 25
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/conversion_rate": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Conversion rate report",
        "description": "Visitor sessions per storefront and how many added to cart, reached checkout and bought.",
        "operationId": "ReportV2_ConversionRateReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversionRateReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront": "Demo Store",
                        "added_to_cart": 1286,
                        "converted": 284,
                        "reached_checkout": 893,
                        "total_sessions": 37658
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/report/affiliates": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Affiliates report",
        "description": "Referred orders, their total and the commission per affiliate.",
        "operationId": "ReportV2_AffiliatesReport",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "query",
            "required": true,
            "description": "Storefront id, or 0 for all storefronts in your account. An id that doesn't match a storefront returns no rows.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "required": true,
            "description": "First day of the report (YYYY-MM-DD), inclusive.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "required": true,
            "description": "Last day of the report (YYYY-MM-DD), inclusive. Swapped with fromDate if earlier.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AffiliatesReportDataV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "affiliate_id": 2,
                        "company": "Acme, Inc.",
                        "affiliate_code": "splash-page",
                        "first_name": "Sam",
                        "last_name": "Lee",
                        "email": "sam.lee@domain.com",
                        "order_count": 83,
                        "order_total": 112309.65,
                        "affiliate_total": 83.0
                      },
                      {
                        "affiliate_id": 1,
                        "company": "Demo Company",
                        "affiliate_code": "demo-affiliate",
                        "first_name": "Alex",
                        "last_name": "Rivera",
                        "email": "alex.rivera@domain.com",
                        "order_count": 6,
                        "order_total": 209.09,
                        "affiliate_total": 12.55
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "storefrontId, fromDate or toDate is not a valid value (for example fromDate=notadate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "storefrontId, fromDate or toDate is missing: no route matches without all three.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/all": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "List storefronts",
        "description": "Returns every storefront in your account that hasn't been deleted.",
        "operationId": "StorefrontV2_GetStorefrontList",
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Storefront"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "id": 1,
                        "name": "Retail Print Site",
                        "url": "https://www.retailprintsite.com",
                        "is_retail": true
                      },
                      {
                        "id": 2,
                        "name": "B2B Print Site",
                        "url": "https://www.b2bprintsite.com",
                        "is_retail": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/{storefrontId}": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "Get a storefront",
        "operationId": "StorefrontV2_GetStorefront",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "path",
            "required": true,
            "description": "Storefront id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Storefront"
                },
                "examples": {
                  "default": {
                    "value": {
                      "id": 1,
                      "name": "Demo Store",
                      "url": "demostore.com",
                      "is_retail": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Storefront not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/{storefrontId}/statuses": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "List a storefront's order statuses",
        "description": "Returns the storefront's order statuses in their configured order. Filter the order search by status id; set an order's status by name.",
        "operationId": "StorefrontV2_GetStatusList",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "path",
            "required": true,
            "description": "Storefront id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Status"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "id": 1,
                        "name": "Beginning",
                        "is_production": false,
                        "order": 1
                      },
                      {
                        "id": 105,
                        "name": "Needs Proof",
                        "is_production": false,
                        "order": 2
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Storefront not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/{storefrontId}/sales_reps": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "List a storefront's sales reps",
        "description": "Returns the storefront's customers flagged as sales reps. Filter the order search by their ids.",
        "operationId": "StorefrontV2_GetSalesRepList",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "path",
            "required": true,
            "description": "Storefront id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "storefront": "Demo Store",
                        "storefront_id": 1,
                        "id": 24,
                        "first_name": "Demo",
                        "last_name": "User",
                        "email": "demo.user@domain.com",
                        "username": "demouser",
                        "receive_marketing_emails": true,
                        "last_logged_in_on": "2026-11-16T15:01:16.62Z",
                        "created_on": "2021-08-30T13:34:44.62Z",
                        "last_updated_on": "2026-10-01T18:04:43.75Z",
                        "company": "Demo Company",
                        "organization": null,
                        "user_groups": [],
                        "tax_exempt": false
                      },
                      {
                        "storefront": "Demo Store",
                        "storefront_id": 1,
                        "id": 51516,
                        "first_name": "Demo",
                        "last_name": "Approver",
                        "email": "approver@demostore.com",
                        "username": "approver",
                        "receive_marketing_emails": true,
                        "last_logged_in_on": "2012-11-26T16:41:42.317Z",
                        "created_on": "2012-11-26T15:57:09.927Z",
                        "last_updated_on": "2026-11-05T16:54:49.493Z",
                        "company": null,
                        "organization": null,
                        "user_groups": [],
                        "tax_exempt": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Storefront not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/{storefrontId}/search_orders": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "Search a storefront's orders",
        "description": "Returns 20 orders per page, oldest first, with paging totals. All filters are optional and combine.",
        "operationId": "StorefrontV2_SearchOrders",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "path",
            "required": true,
            "description": "Storefront id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "query",
            "in": "query",
            "description": "Text to match in the order id, the customer's first or last name, the PO number, or the billing or shipping first or last name.",
            "schema": {
              "type": "string",
              "default": "",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Only orders placed on or after this date (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Only orders placed on or before this date (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "status",
            "in": "query",
            "description": "Comma-separated status ids (see the status list).",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 5
          },
          {
            "name": "sales_rep",
            "in": "query",
            "description": "Comma-separated sales rep customer ids (see the sales rep list).",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number, from 1. Defaults to 1.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            },
            "x-position": 7
          },
          {
            "name": "view",
            "in": "query",
            "description": "active (default): neither archived nor deleted; archived; or deleted.",
            "schema": {
              "type": "string",
              "default": "active",
              "nullable": true
            },
            "x-position": 8
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSearchResultsV2"
                },
                "examples": {
                  "default": {
                    "value": {
                      "total_results": 738,
                      "page": 1,
                      "total_pages": 37,
                      "orders": [
                        {
                          "storefront": "Demo Store",
                          "id": 15,
                          "is_archived": false,
                          "is_deleted": false,
                          "integration_id": null,
                          "status": "Declined",
                          "customer": {
                            "storefront": "Demo Store",
                            "storefront_id": 1,
                            "id": 24,
                            "first_name": "Demo",
                            "last_name": "User",
                            "email": "demo.user@domain.com",
                            "username": "demouser",
                            "receive_marketing_emails": true,
                            "last_logged_in_on": "2026-11-16T15:01:16.62Z",
                            "created_on": "2021-08-30T13:34:44.62Z",
                            "last_updated_on": "2026-10-01T18:04:43.75Z",
                            "company": "Demo Company",
                            "organization": null,
                            "user_groups": [],
                            "tax_exempt": false
                          },
                          "shipping_address": {
                            "id": 1,
                            "name": "Default",
                            "company": "",
                            "first_name": "John",
                            "last_name": "Doe",
                            "line_1": "123 Main St.",
                            "line_2": "Apt. B1",
                            "line_3": null,
                            "line_4": null,
                            "city": "Springfield",
                            "state": "MA",
                            "postal_code": "01103",
                            "phone": "555-123-4567",
                            "email": "demo@demostore.com",
                            "country_code": "US",
                            "is_residential": true
                          },
                          "billing_address": {
                            "id": 1,
                            "name": "Default",
                            "company": "",
                            "first_name": "John",
                            "last_name": "Doe",
                            "line_1": "123 Main St.",
                            "line_2": "Apt. B1",
                            "line_3": null,
                            "line_4": null,
                            "city": "Springfield",
                            "state": "MA",
                            "postal_code": "01103",
                            "phone": "555-123-4567",
                            "email": "demo@demostore.com",
                            "country_code": "US",
                            "is_residential": true
                          },
                          "payment_creditcard": true,
                          "payment_check": false,
                          "payment_cod": false,
                          "payment_po": false,
                          "payment_invoice": false,
                          "payment_paypal": false,
                          "payment_reference": null,
                          "payment_avscode": null,
                          "payment_cvcode": null,
                          "card_type": "Visa",
                          "card_number": "2222",
                          "check_number": null,
                          "po_number": null,
                          "invoice_number": null,
                          "tax_total": 0.0,
                          "shipping_total": 1.0,
                          "sub_total": 8.0,
                          "promotion_total": 0.0,
                          "promotion_code": null,
                          "created_on": "2012-01-10T05:00:00Z",
                          "shipped_on": null,
                          "shipping_provider": "FIXED",
                          "shipping_service": "None",
                          "items": [
                            {
                              "id": 15,
                              "sub_total": 8.0,
                              "created_on": "2012-02-14T20:16:29.493Z",
                              "status": "Declined",
                              "quantity": 10,
                              "due_on": null,
                              "weight": 0.0586,
                              "base_price": 8.0,
                              "options_price": 0.0,
                              "markup_price": 0.0,
                              "image_fee": 0.0,
                              "download_fee": 0.0,
                              "integration_id": "",
                              "product_id": 2,
                              "item_number": "104",
                              "model_number": "static-product-2",
                              "name": "Static Product",
                              "vendor": null,
                              "options": [],
                              "notes": "",
                              "parametric": null,
                              "reorder_ref": null,
                              "shipment_index": 1
                            }
                          ],
                          "shipments": [],
                          "checkout_fields": []
                        },
                        {
                          "storefront": "Demo Store",
                          "id": 39,
                          "is_archived": false,
                          "is_deleted": false,
                          "integration_id": null,
                          "status": "Beginning",
                          "customer": {
                            "storefront": "Demo Store",
                            "storefront_id": 1,
                            "id": 24,
                            "first_name": "Demo",
                            "last_name": "User",
                            "email": "demo.user@domain.com",
                            "username": "demouser",
                            "receive_marketing_emails": true,
                            "last_logged_in_on": "2026-11-16T15:01:16.62Z",
                            "created_on": "2021-08-30T13:34:44.62Z",
                            "last_updated_on": "2026-10-01T18:04:43.75Z",
                            "company": "Demo Company",
                            "organization": null,
                            "user_groups": [],
                            "tax_exempt": false
                          },
                          "shipping_address": {
                            "id": 1,
                            "name": "Default",
                            "company": "",
                            "first_name": "John",
                            "last_name": "Doe",
                            "line_1": "123 Main St.",
                            "line_2": "Apt. B1",
                            "line_3": null,
                            "line_4": null,
                            "city": "Springfield",
                            "state": "MA",
                            "postal_code": "01103",
                            "phone": "555-123-4567",
                            "email": "demo@demostore.com",
                            "country_code": "US",
                            "is_residential": true
                          },
                          "billing_address": {
                            "id": 1,
                            "name": "Default",
                            "company": "",
                            "first_name": "John",
                            "last_name": "Doe",
                            "line_1": "123 Main St.",
                            "line_2": "Apt. B1",
                            "line_3": null,
                            "line_4": null,
                            "city": "Springfield",
                            "state": "MA",
                            "postal_code": "01103",
                            "phone": "555-123-4567",
                            "email": "demo@demostore.com",
                            "country_code": "US",
                            "is_residential": true
                          },
                          "payment_creditcard": true,
                          "payment_check": false,
                          "payment_cod": false,
                          "payment_po": false,
                          "payment_invoice": false,
                          "payment_paypal": false,
                          "payment_reference": "6773172",
                          "payment_avscode": "",
                          "payment_cvcode": "",
                          "card_type": "Visa",
                          "card_number": "2222",
                          "check_number": null,
                          "po_number": null,
                          "invoice_number": null,
                          "tax_total": 0.0,
                          "shipping_total": 1.0,
                          "sub_total": 8.0,
                          "promotion_total": 0.0,
                          "promotion_code": null,
                          "created_on": "2012-01-10T05:00:00Z",
                          "shipped_on": null,
                          "shipping_provider": "FIXED",
                          "shipping_service": "None",
                          "items": [
                            {
                              "id": 39,
                              "sub_total": 8.0,
                              "created_on": "2012-02-21T14:33:57.833Z",
                              "status": "Beginning",
                              "quantity": 10,
                              "due_on": null,
                              "weight": 32.2504,
                              "base_price": 8.0,
                              "options_price": 0.0,
                              "markup_price": 0.0,
                              "image_fee": 0.0,
                              "download_fee": 0.0,
                              "integration_id": "",
                              "product_id": 2,
                              "item_number": "104",
                              "model_number": "static-product-2",
                              "name": "Static Product",
                              "vendor": null,
                              "options": [
                                {
                                  "name": "Color",
                                  "value": "Full Color",
                                  "option_integration_id": null,
                                  "value_integration_id": null
                                },
                                {
                                  "name": "Size",
                                  "value": "3.5\" × 2\"",
                                  "option_integration_id": null,
                                  "value_integration_id": null
                                }
                              ],
                              "notes": "",
                              "parametric": null,
                              "reorder_ref": null,
                              "shipment_index": 1
                            }
                          ],
                          "shipments": [],
                          "checkout_fields": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/api/v2/storefront/{storefrontId}/abandoned_carts": {
      "get": {
        "tags": [
          "Storefronts"
        ],
        "summary": "List a storefront's abandoned carts",
        "description": "Returns carts that still have items, belonging to permanent customers, created in the date range. Without both fromDate and toDate, the range is the last recentSpan (default 7 days). The range can't start more than 180 days ago.",
        "operationId": "StorefrontV2_GetAbandonedCarts",
        "parameters": [
          {
            "name": "storefrontId",
            "in": "path",
            "required": true,
            "description": "Storefront id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Start of the range (YYYY-MM-DD). Used only together with toDate, otherwise ignored.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "End of the range (YYYY-MM-DD). Used only together with fromDate, otherwise ignored.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "recentSpan",
            "in": "query",
            "description": "Range ending today, used when fromDate and toDate are not both given: a number followed by d (days), w (weeks) or m (30-day months), for example 14d, 2w or 3m. Defaults to 7 days.",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 4
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbandonedCartV2"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "created_on": "2025-02-10T14:28:21.773",
                        "customer_id": 24,
                        "first_name": "Demo",
                        "last_name": "User",
                        "email": "demo.user@domain.com",
                        "items": [
                          {
                            "name": "Political 01 - 8\" x 6\"",
                            "quantity": 500,
                            "options": [
                              {
                                "name": "Printing",
                                "value": "Full Color Both Sides"
                              },
                              {
                                "name": "Size (W x H)",
                                "value": "8\" x 6\""
                              },
                              {
                                "name": "Turnaround",
                                "value": "4 Business Days"
                              },
                              {
                                "name": "Paper",
                                "value": "12 Pt C2S with Gloss UV Front"
                              },
                              {
                                "name": "Mailing Services",
                                "value": "None - Ship to Me"
                              },
                              {
                                "name": "Proof",
                                "value": "Manually Processed PDF Emailed"
                              }
                            ],
                            "thumbnail": "/thumbnails/p/210641"
                          },
                          {
                            "name": "Political 01 - 8\" x 6\"",
                            "quantity": 500,
                            "options": [
                              {
                                "name": "Printing",
                                "value": "Full Color Both Sides"
                              },
                              {
                                "name": "Size (W x H)",
                                "value": "8\" x 6\""
                              },
                              {
                                "name": "Turnaround",
                                "value": "4 Business Days"
                              },
                              {
                                "name": "Paper",
                                "value": "12 Pt C2S with Gloss UV Front"
                              },
                              {
                                "name": "Mailing Services",
                                "value": "None - Ship to Me"
                              },
                              {
                                "name": "Proof",
                                "value": "Manually Processed PDF Emailed"
                              }
                            ],
                            "thumbnail": "/thumbnails/p/210641"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "The range starts more than 180 days ago, through fromDate or through recentSpan (7m is 210 days).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "From date can't be more than 180 days in the past."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Storefront not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "value": {
                      "Message": "Storefront not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key or token is missing, invalid, inactive or deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Bad credentials",
                    "description": "The key or token is missing, does not match, or the token is inactive or deleted.",
                    "value": {
                      "Message": "Invalid key or token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Your license does not include this section of the API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Section not in your license",
                    "description": "The message names the section, e.g. Orders, Customers, Products, Storefronts, Reports or Webhooks.",
                    "value": {
                      "Message": "Your license does not include the Orders API."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded: wait for Retry-After seconds before calling again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds until the next call is allowed.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Calls allowed per window for your license.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Calls left right now.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the full allowance is available again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "examples": {
                  "default": {
                    "summary": "Rate limit exceeded",
                    "description": "Each license may make 100 calls per 10 seconds across all its API keys. Wait for the Retry-After header (seconds) before calling again.",
                    "value": {
                      "Message": "Rate limit exceeded: 100 calls per 10 seconds."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CustomerV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront": {
            "type": "string",
            "description": "Name of the storefront the customer belongs to.",
            "nullable": true
          },
          "storefront_id": {
            "type": "integer",
            "description": "Id of the storefront the customer belongs to. Required when creating a customer.",
            "format": "int32"
          },
          "id": {
            "type": "integer",
            "description": "Customer id. When transferring a temporary customer, the id of the destination customer.",
            "format": "int32"
          },
          "first_name": {
            "type": "string",
            "description": "First name. Required when creating a customer.",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "description": "Last name. Required when creating a customer.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address, unique on the storefront. Required when creating a customer.",
            "nullable": true
          },
          "username": {
            "type": "string",
            "description": "Login username, 3 to 50 characters, unique on the storefront. Required when creating a customer.",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "Write-only, never returned. At least 6 characters. Required when creating a customer; on update, sets a new password.",
            "nullable": true
          },
          "receive_marketing_emails": {
            "type": "boolean",
            "description": "True when the customer has opted in to marketing emails. Set on create (defaults to false)."
          },
          "last_logged_in_on": {
            "type": "string",
            "description": "When the customer last logged in (UTC). Null if never.",
            "format": "date-time",
            "nullable": true
          },
          "created_on": {
            "type": "string",
            "description": "When the account was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "last_updated_on": {
            "type": "string",
            "description": "When the profile was last changed (UTC). Null if never.",
            "format": "date-time",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "Company name the customer entered on their profile (not the organization).",
            "nullable": true
          },
          "organization": {
            "type": "string",
            "description": "Name of the organization the customer belongs to, if any. Organizations are managed in the admin.",
            "nullable": true
          },
          "user_groups": {
            "type": "array",
            "description": "Names of the user groups the customer belongs to (the default RETAIL group isn't listed). Groups drive pricing and access.",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "tax_exempt": {
            "type": "boolean",
            "description": "True when the customer is tax-exempt: set on the customer, or inherited from a tax-exempt user group."
          },
          "is_temporary": {
            "type": "boolean",
            "description": "Present and true only for a temporary (guest) customer. Send true on create to make a temporary customer."
          }
        }
      },
      "ErrorMessage": {
        "type": "object",
        "description": "Error body returned by the API.",
        "properties": {
          "Message": {
            "type": "string",
            "description": "What went wrong."
          }
        }
      },
      "HookEntry": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Subscription id. Use it to unsubscribe.",
            "format": "int64"
          },
          "target_url": {
            "type": "string",
            "description": "The URL that receives the events.",
            "nullable": true
          },
          "event": {
            "type": "string",
            "description": "The subscribed event.",
            "nullable": true
          }
        }
      },
      "HookSubscription": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "target_url": {
            "type": "string",
            "description": "Required. The URL PrintNow POSTs the events to. It must be reachable from PrintNow; IP addresses in private, loopback or link-local ranges are refused.",
            "nullable": true
          },
          "event": {
            "type": "string",
            "description": "Required. The event to subscribe to: order_created, order_updated, order_deleted, customer_created, customer_updated or customer_deleted.",
            "nullable": true
          }
        }
      },
      "OrderV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront": {
            "type": "string",
            "description": "Name of the storefront where the order was placed.",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "description": "Order id.",
            "format": "int32"
          },
          "is_archived": {
            "type": "boolean",
            "description": "True when the order has been archived in the admin."
          },
          "is_deleted": {
            "type": "boolean",
            "description": "True when the order has been deleted in the admin."
          },
          "integration_id": {
            "type": "string",
            "description": "Identifier from an external system the order came from or was sent to (for example a print MIS job id). Null when not set.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The order's current status name, as configured on the storefront (for example \"New Order\", \"In Production\").",
            "nullable": true
          },
          "customer": {
            "description": "The customer who placed the order (the same object the Customers endpoints return).",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomerV2"
              }
            ]
          },
          "shipping_address": {
            "description": "Ship-to address of the order's primary shipment. For split shipping, see shipments.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "billing_address": {
            "description": "Billing address.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "payment_creditcard": {
            "type": "boolean",
            "description": "True when the order was paid by credit card."
          },
          "payment_check": {
            "type": "boolean",
            "description": "True when the order was paid by check."
          },
          "payment_cod": {
            "type": "boolean",
            "description": "True when the order is cash on delivery."
          },
          "payment_po": {
            "type": "boolean",
            "description": "True when the order was paid by purchase order."
          },
          "payment_invoice": {
            "type": "boolean",
            "description": "True when the order will be invoiced."
          },
          "payment_paypal": {
            "type": "boolean",
            "description": "Inferred, not stored: true when none of the other payment flags is set."
          },
          "payment_reference": {
            "type": "string",
            "description": "Payment gateway transaction reference (for example a Stripe charge id).",
            "nullable": true
          },
          "payment_avscode": {
            "type": "string",
            "description": "Address verification (AVS) response code from the payment gateway.",
            "nullable": true
          },
          "payment_cvcode": {
            "type": "string",
            "description": "Card verification (CVV) response code from the payment gateway.",
            "nullable": true
          },
          "card_type": {
            "type": "string",
            "description": "Card brand (Visa, Mastercard, ...). Credit card payments only.",
            "nullable": true
          },
          "card_number": {
            "type": "string",
            "description": "Last 4 digits of the card. Credit card payments only.",
            "nullable": true
          },
          "check_number": {
            "type": "string",
            "description": "Check number. Check payments only.",
            "nullable": true
          },
          "po_number": {
            "type": "string",
            "description": "Purchase order number, when given at checkout.",
            "nullable": true
          },
          "invoice_number": {
            "type": "string",
            "description": "Invoice number, when the order is invoiced.",
            "nullable": true
          },
          "tax_total": {
            "type": "number",
            "description": "Total tax for the order.",
            "format": "decimal"
          },
          "shipping_total": {
            "type": "number",
            "description": "Total shipping charge for the order.",
            "format": "decimal"
          },
          "sub_total": {
            "type": "number",
            "description": "Order subtotal: the sum of the line items' totals.",
            "format": "decimal"
          },
          "promotion_total": {
            "type": "number",
            "description": "Total discount from promotions.",
            "format": "decimal"
          },
          "promotion_code": {
            "type": "string",
            "description": "Promotion code applied at checkout. Null when none.",
            "nullable": true
          },
          "created_on": {
            "type": "string",
            "description": "When the order was placed (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "shipped_on": {
            "type": "string",
            "description": "When the order was marked shipped (UTC). Null until then.",
            "format": "date-time",
            "nullable": true
          },
          "shipping_provider": {
            "type": "string",
            "description": "Carrier of the primary shipment (for example \"UPS\"). Null when not set.",
            "nullable": true
          },
          "shipping_service": {
            "type": "string",
            "description": "Shipping service of the primary shipment (for example \"UPS Ground\").",
            "nullable": true
          },
          "items": {
            "type": "array",
            "description": "The order's line items.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/OrderItemV2"
            }
          },
          "shipments": {
            "type": "array",
            "description": "The order's shipments, one per destination; every order has at least one. With split shipping there is one\nper ship-to address. shipping_address, shipping_provider and shipping_service describe the primary shipment;\nshipping_total is the whole order's shipping.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ShipmentV2"
            }
          },
          "checkout_fields": {
            "type": "array",
            "description": "Custom checkout fields configured on the storefront, with the values entered for this order.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/NameValuePair"
            }
          }
        }
      },
      "Address": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Address id.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Address label (for example \"Office\").",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "Company name.",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "description": "Recipient's first name.",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "description": "Recipient's last name.",
            "nullable": true
          },
          "line_1": {
            "type": "string",
            "description": "Address line 1.",
            "nullable": true
          },
          "line_2": {
            "type": "string",
            "description": "Address line 2.",
            "nullable": true
          },
          "line_3": {
            "type": "string",
            "description": "Address line 3.",
            "nullable": true
          },
          "line_4": {
            "type": "string",
            "description": "Address line 4.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State or province.",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "description": "Postal or ZIP code.",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address.",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "description": "Country code (for example \"US\").",
            "nullable": true
          },
          "is_residential": {
            "type": "boolean",
            "description": "True for a residential address (affects shipping rates)."
          }
        }
      },
      "OrderItemV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Line item id.",
            "format": "int32"
          },
          "sub_total": {
            "type": "number",
            "description": "Line item total.",
            "format": "decimal"
          },
          "created_on": {
            "type": "string",
            "description": "When the item was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The item's status name. Items in one order can have different statuses.",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Ordered quantity.",
            "format": "int32"
          },
          "due_on": {
            "type": "string",
            "description": "Due date (UTC). Null when not set.",
            "format": "date-time",
            "nullable": true
          },
          "weight": {
            "type": "number",
            "description": "Item weight, used for shipping rates.",
            "format": "decimal"
          },
          "base_price": {
            "type": "number",
            "description": "Base product price, before options and markup.",
            "format": "decimal"
          },
          "options_price": {
            "type": "number",
            "description": "Total price of the selected options.",
            "format": "decimal"
          },
          "markup_price": {
            "type": "number",
            "description": "Service markup.",
            "format": "decimal"
          },
          "image_fee": {
            "type": "number",
            "description": "Fee for stock images used in the design.",
            "format": "decimal"
          },
          "download_fee": {
            "type": "number",
            "description": "Fee for downloadable content.",
            "format": "decimal"
          },
          "integration_id": {
            "type": "string",
            "description": "The product's external integration id. Taken from the original product when the ordered product is a customized copy.",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "description": "Id of the ordered product.",
            "format": "int32",
            "nullable": true
          },
          "item_number": {
            "type": "string",
            "description": "The product's item (SKU) number. Taken from the original product when the ordered product is a customized copy.",
            "nullable": true
          },
          "model_number": {
            "type": "string",
            "description": "The product's model number. Taken from the original product when the ordered product is a customized copy.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Product name.",
            "nullable": true
          },
          "vendor": {
            "type": "string",
            "description": "Name of the vendor assigned to the product.",
            "nullable": true
          },
          "options": {
            "type": "array",
            "description": "The options selected for this item.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/OptionItem"
            }
          },
          "notes": {
            "type": "string",
            "description": "Product and order item comments, combined.",
            "nullable": true
          },
          "parametric": {
            "type": "array",
            "description": "Dimensions and variables of a Print CAD (parametric) product. Null for other products.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ParametricPropertyV2"
            }
          },
          "reorder_ref": {
            "type": "string",
            "description": "Reference to the original item when this item is a reorder. Null otherwise.",
            "nullable": true
          },
          "shipment_index": {
            "type": "integer",
            "description": "1-based index of the shipment this item belongs to (see the order's shipments). 1 for single-shipment orders.",
            "format": "int32"
          }
        }
      },
      "OptionItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Option name (for example \"Paper Stock\").",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "The selected value (for example \"14pt Matte\").",
            "nullable": true
          },
          "option_integration_id": {
            "type": "string",
            "description": "The option's external integration id. Null when not set.",
            "nullable": true
          },
          "value_integration_id": {
            "type": "string",
            "description": "The selected value's external integration id. Null when not set.",
            "nullable": true
          }
        }
      },
      "ParametricPropertyV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Property name: blankWidth, blankHeight, standard, or a variable defined on the product.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Property value. Dimensions are in the product's configured units.",
            "nullable": true
          }
        }
      },
      "ShipmentV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "index": {
            "type": "integer",
            "description": "1-based position of this shipment in the order. Items point to it with shipment_index.",
            "format": "int32"
          },
          "provider": {
            "type": "string",
            "description": "Carrier or vendor for this shipment (for example \"UPS\"). Null when not set.",
            "nullable": true
          },
          "service": {
            "type": "string",
            "description": "Shipping service for this shipment (for example \"UPS Ground\"). Null when not set.",
            "nullable": true
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charge for this shipment only.",
            "format": "decimal"
          },
          "tax_total": {
            "type": "number",
            "description": "Tax for this shipment only.",
            "format": "decimal"
          },
          "tracking_numbers": {
            "type": "string",
            "description": "Tracking numbers for this shipment. Null when none are recorded.",
            "nullable": true
          },
          "shipped_on": {
            "type": "string",
            "description": "When this shipment was marked shipped (UTC). Null until then; shipments ship independently.",
            "format": "date-time",
            "nullable": true
          },
          "ship_to_address": {
            "description": "Where this shipment goes.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          }
        }
      },
      "NameValuePair": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Field name.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Field value.",
            "nullable": true
          }
        }
      },
      "TrackingInfo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tracking_number": {
            "type": "string",
            "description": "Optional. Tracking number to add to the order (duplicates are ignored).",
            "nullable": true
          }
        }
      },
      "StatusInfoV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_status": {
            "type": "string",
            "description": "Required. Name of the status to set; must match a status on the storefront (case-insensitive). List them with the storefront statuses endpoint.",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "description": "Comments for the order history entry. Multiple lines allowed.",
            "nullable": true
          },
          "tracking_number": {
            "type": "string",
            "description": "Tracking number to add to the order. Duplicates are ignored.",
            "nullable": true
          },
          "user_initials": {
            "type": "string",
            "description": "Initials recorded in the order history to show who made the change.",
            "nullable": true
          },
          "notify_customer": {
            "type": "boolean",
            "description": "Send the status's email to the customer. Defaults to false."
          },
          "notify_vendor": {
            "type": "boolean",
            "description": "Send purchase order emails to the order's vendors. Defaults to false."
          }
        }
      },
      "ProductRendering": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Rendering id. Use it to download the rendering image.",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Rendering name (for example \"Front View\"). Also the downloaded file's name.",
            "nullable": true
          }
        }
      },
      "SalesReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "user_count": {
            "type": "integer",
            "description": "Number of different customers who ordered.",
            "format": "int32"
          },
          "order_count": {
            "type": "integer",
            "description": "Number of orders.",
            "format": "int32"
          },
          "order_average": {
            "type": "number",
            "description": "Average order total.",
            "format": "decimal"
          },
          "order_total": {
            "type": "number",
            "description": "Total sales.",
            "format": "decimal"
          }
        }
      },
      "TaxReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_id": {
            "type": "integer",
            "description": "Order id.",
            "format": "int32"
          },
          "order_date": {
            "type": "string",
            "description": "When the order was placed. Server-local time, ISO 8601 without a time zone (not UTC).",
            "format": "date-time"
          },
          "country": {
            "type": "string",
            "description": "Ship-to country.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Ship-to state or province.",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "description": "Order subtotal.",
            "format": "decimal"
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charge.",
            "format": "decimal"
          },
          "promotion_total": {
            "type": "number",
            "description": "Promotion discount.",
            "format": "decimal"
          },
          "tax_total": {
            "type": "number",
            "description": "Tax.",
            "format": "decimal"
          },
          "grand_total": {
            "type": "number",
            "description": "Order total: subtotal + shipping + tax - promotions.",
            "format": "decimal"
          },
          "group_by_key": {
            "type": "string",
            "description": "The country, for grouping rows.",
            "nullable": true
          }
        }
      },
      "OrderReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "period": {
            "type": "string",
            "description": "The period this row covers, by viewBy: M/D/YYYY (day, the default), M/YYYY (month) or YYYY (year).",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Orders placed in the period.",
            "format": "int32"
          },
          "item_count": {
            "type": "integer",
            "description": "Line items ordered in the period.",
            "format": "int32"
          },
          "order_total": {
            "type": "number",
            "description": "Sales in the period.",
            "format": "decimal"
          },
          "tax_total": {
            "type": "number",
            "description": "Tax in the period.",
            "format": "decimal"
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charges in the period.",
            "format": "decimal"
          }
        }
      },
      "OrderDetailsReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_id": {
            "type": "integer",
            "description": "Order id.",
            "format": "int32"
          },
          "customer_email": {
            "type": "string",
            "description": "The customer's email address.",
            "nullable": true
          },
          "billing_address": {
            "type": "string",
            "description": "Billing address, formatted as text.",
            "nullable": true
          },
          "shipping_address": {
            "type": "string",
            "description": "Shipping address, formatted as text.",
            "nullable": true
          },
          "order_date": {
            "type": "string",
            "description": "When the order was placed. Server-local time, ISO 8601 without a time zone (not UTC).",
            "format": "date-time"
          },
          "store_url": {
            "type": "string",
            "description": "The storefront's domain.",
            "nullable": true
          },
          "sales_rep": {
            "type": "string",
            "description": "Name of the order's sales rep.",
            "nullable": true
          },
          "sub_total": {
            "type": "number",
            "description": "Order subtotal.",
            "format": "decimal"
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charge.",
            "format": "decimal"
          },
          "promotion_total": {
            "type": "number",
            "description": "Promotion discount.",
            "format": "decimal"
          },
          "tax_total": {
            "type": "number",
            "description": "Tax.",
            "format": "decimal"
          },
          "grand_total": {
            "type": "number",
            "description": "Order total: subtotal + shipping + tax - promotions.",
            "format": "decimal"
          },
          "promotion_code": {
            "type": "string",
            "description": "Promotion code used, if any.",
            "nullable": true
          },
          "shipping_provider": {
            "type": "string",
            "description": "Shipping carrier.",
            "nullable": true
          },
          "shipping_method": {
            "type": "string",
            "description": "Shipping service.",
            "nullable": true
          },
          "tracking_numbers": {
            "type": "string",
            "description": "Tracking numbers, comma-separated.",
            "nullable": true
          },
          "invoice_number": {
            "type": "string",
            "description": "Invoice number.",
            "nullable": true
          },
          "order_status": {
            "type": "string",
            "description": "The order's current status.",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "The customer's company name.",
            "nullable": true
          },
          "user_group": {
            "type": "string",
            "description": "The customer's user group.",
            "nullable": true
          }
        }
      },
      "OrderItemDetailsReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_id": {
            "type": "integer",
            "description": "Order id.",
            "format": "int32"
          },
          "order_date": {
            "type": "string",
            "description": "When the order was placed, as M/D/YYYY.",
            "nullable": true
          },
          "customer_company": {
            "type": "string",
            "description": "The customer's company name.",
            "nullable": true
          },
          "customer_name": {
            "type": "string",
            "description": "The customer's full name.",
            "nullable": true
          },
          "customer_username": {
            "type": "string",
            "description": "The customer's username.",
            "nullable": true
          },
          "item_id": {
            "type": "integer",
            "description": "Line item id.",
            "format": "int32"
          },
          "item_status": {
            "type": "string",
            "description": "The item's current status.",
            "nullable": true
          },
          "product_name": {
            "type": "string",
            "description": "Product name.",
            "nullable": true
          },
          "product_item_number": {
            "type": "string",
            "description": "The product's item (SKU) number.",
            "nullable": true
          },
          "product_model_number": {
            "type": "string",
            "description": "The product's model number.",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity.",
            "format": "int32"
          },
          "item_total": {
            "type": "number",
            "description": "Line item total.",
            "format": "decimal"
          },
          "shipping_address_line_1": {
            "type": "string",
            "description": "Ship-to address line 1.",
            "nullable": true
          },
          "shipping_address_line_2": {
            "type": "string",
            "description": "Ship-to address line 2.",
            "nullable": true
          },
          "shipping_address_line_3": {
            "type": "string",
            "description": "Ship-to address line 3.",
            "nullable": true
          },
          "shipping_address_line_4": {
            "type": "string",
            "description": "Ship-to address line 4.",
            "nullable": true
          },
          "shipping_address_city": {
            "type": "string",
            "description": "Ship-to city.",
            "nullable": true
          },
          "shipping_address_state": {
            "type": "string",
            "description": "Ship-to state or province.",
            "nullable": true
          },
          "shipping_address_postal_code": {
            "type": "string",
            "description": "Ship-to postal or ZIP code.",
            "nullable": true
          },
          "shipping_method": {
            "type": "string",
            "description": "Shipping service.",
            "nullable": true
          },
          "shipping_provider": {
            "type": "string",
            "description": "Shipping carrier.",
            "nullable": true
          },
          "shipped_on": {
            "type": "string",
            "description": "When the item's shipment shipped. Null if not shipped. Server-local time, ISO 8601 without a time zone (not UTC).",
            "format": "date-time",
            "nullable": true
          },
          "tracking_numbers": {
            "type": "string",
            "description": "Tracking numbers, comma-separated.",
            "nullable": true
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charge of the item's shipment.",
            "format": "decimal"
          },
          "customer_user_groups": {
            "type": "string",
            "description": "The customer's user groups.",
            "nullable": true
          }
        }
      },
      "ProductSalesReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "description": "Product id.",
            "format": "int32"
          },
          "category_name": {
            "type": "string",
            "description": "The product's category.",
            "nullable": true
          },
          "product_name": {
            "type": "string",
            "description": "Product name.",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Units ordered.",
            "format": "int32"
          },
          "order_count": {
            "type": "integer",
            "description": "Number of orders containing the product.",
            "format": "int32"
          },
          "sales_total": {
            "type": "number",
            "description": "Sales of the product.",
            "format": "decimal"
          }
        }
      },
      "PromotionCodeReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "description": "Promotion code.",
            "nullable": true
          },
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Promotion description.",
            "nullable": true
          },
          "expiration": {
            "type": "string",
            "description": "Expiration date, as M/D/YYYY.",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Number of orders that used the code.",
            "format": "int32"
          },
          "discount_total": {
            "type": "number",
            "description": "Total discount given.",
            "format": "decimal"
          }
        }
      },
      "CustomerListReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "customer_id": {
            "type": "integer",
            "description": "Customer id.",
            "format": "int32"
          },
          "customer_company": {
            "type": "string",
            "description": "The customer's company name.",
            "nullable": true
          },
          "customer_first_name": {
            "type": "string",
            "description": "The customer's first name.",
            "nullable": true
          },
          "customer_last_name": {
            "type": "string",
            "description": "The customer's last name.",
            "nullable": true
          },
          "customer_email": {
            "type": "string",
            "description": "The customer's email address.",
            "nullable": true
          },
          "customer_username": {
            "type": "string",
            "description": "The customer's username.",
            "nullable": true
          },
          "customer_last_login_on": {
            "type": "string",
            "description": "When the customer last logged in. Server-local time, ISO 8601 without a time zone (not UTC).",
            "format": "date-time",
            "nullable": true
          },
          "customer_created_on": {
            "type": "string",
            "description": "When the account was created. Server-local time, ISO 8601 without a time zone (not UTC).",
            "format": "date-time",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Orders placed in the date range.",
            "format": "int32"
          },
          "sales_total": {
            "type": "number",
            "description": "Sales in the date range.",
            "format": "decimal"
          },
          "customer_marketing_emails": {
            "type": "boolean",
            "description": "True when the customer opted in to marketing emails."
          }
        }
      },
      "CustomerSalesReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "customer_id": {
            "type": "integer",
            "description": "Customer id.",
            "format": "int32"
          },
          "customer_company": {
            "type": "string",
            "description": "The customer's company name.",
            "nullable": true
          },
          "customer_first_name": {
            "type": "string",
            "description": "The customer's first name.",
            "nullable": true
          },
          "customer_last_name": {
            "type": "string",
            "description": "The customer's last name.",
            "nullable": true
          },
          "customer_email": {
            "type": "string",
            "description": "The customer's email address.",
            "nullable": true
          },
          "customer_username": {
            "type": "string",
            "description": "The customer's username.",
            "nullable": true
          },
          "customer_last_login_on": {
            "type": "string",
            "description": "When the customer last logged in, as M/D/YYYY.",
            "nullable": true
          },
          "customer_created_on": {
            "type": "string",
            "description": "When the account was created, as M/D/YYYY.",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Orders placed in the date range.",
            "format": "int32"
          },
          "sales_total": {
            "type": "number",
            "description": "Sales in the date range.",
            "format": "decimal"
          }
        }
      },
      "ShippingReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "description": "Shipping carrier.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Shipping service.",
            "nullable": true
          },
          "shipping_total": {
            "type": "number",
            "description": "Shipping charges.",
            "format": "decimal"
          },
          "order_count": {
            "type": "integer",
            "description": "Number of orders shipped this way.",
            "format": "int32"
          }
        }
      },
      "SalesRepReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "sales_rep_id": {
            "type": "integer",
            "description": "The sales rep's customer id.",
            "format": "int32"
          },
          "sales_rep_name": {
            "type": "string",
            "description": "The sales rep's name.",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Orders assigned to the rep.",
            "format": "int32"
          },
          "order_average": {
            "type": "number",
            "description": "Average total of those orders.",
            "format": "decimal"
          },
          "order_total": {
            "type": "number",
            "description": "Total of those orders.",
            "format": "decimal"
          }
        }
      },
      "SavedProjectReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront_id": {
            "type": "integer",
            "description": "Storefront id.",
            "format": "int32"
          },
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "customer_id": {
            "type": "integer",
            "description": "Customer id.",
            "format": "int32"
          },
          "customer_company": {
            "type": "string",
            "description": "The customer's company name.",
            "nullable": true
          },
          "customer_first_name": {
            "type": "string",
            "description": "The customer's first name.",
            "nullable": true
          },
          "customer_last_name": {
            "type": "string",
            "description": "The customer's last name.",
            "nullable": true
          },
          "customer_email": {
            "type": "string",
            "description": "The customer's email address.",
            "nullable": true
          },
          "customer_username": {
            "type": "string",
            "description": "The customer's username.",
            "nullable": true
          },
          "project_count": {
            "type": "integer",
            "description": "Number of saved projects.",
            "format": "int32"
          }
        }
      },
      "ConversionRateReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "storefront": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "added_to_cart": {
            "type": "integer",
            "description": "Sessions that added an item to the cart.",
            "format": "int32"
          },
          "converted": {
            "type": "integer",
            "description": "Sessions that completed a purchase.",
            "format": "int32"
          },
          "reached_checkout": {
            "type": "integer",
            "description": "Sessions that reached checkout.",
            "format": "int32"
          },
          "total_sessions": {
            "type": "integer",
            "description": "Visitor sessions.",
            "format": "int32"
          }
        }
      },
      "AffiliatesReportDataV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "affiliate_id": {
            "type": "integer",
            "description": "Affiliate id.",
            "format": "int32"
          },
          "company": {
            "type": "string",
            "description": "The affiliate's company name.",
            "nullable": true
          },
          "affiliate_code": {
            "type": "string",
            "description": "The affiliate's referral code.",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "description": "The affiliate's first name.",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "description": "The affiliate's last name.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "The affiliate's email address.",
            "nullable": true
          },
          "order_count": {
            "type": "integer",
            "description": "Number of referred orders.",
            "format": "int32"
          },
          "order_total": {
            "type": "number",
            "description": "Total of the referred orders.",
            "format": "decimal"
          },
          "affiliate_total": {
            "type": "number",
            "description": "The affiliate's commission.",
            "format": "decimal"
          }
        }
      },
      "Storefront": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Storefront id. Use it wherever an endpoint takes a storefrontId.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Storefront name.",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "The storefront's domain.",
            "nullable": true
          },
          "is_retail": {
            "type": "boolean",
            "description": "True for a retail (public) storefront; false for a private (B2B) storefront."
          }
        }
      },
      "Status": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Status id. Use it to filter the order search; to set a status, use its name.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Status name, as shown in the admin. This is what the order status endpoints take.",
            "nullable": true
          },
          "is_production": {
            "type": "boolean",
            "description": "True for a production status (the status type starts with \"production\")."
          },
          "order": {
            "type": "integer",
            "description": "Position in the storefront's status list.",
            "format": "int32"
          }
        }
      },
      "OrderSearchResultsV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "total_results": {
            "type": "integer",
            "description": "Number of matching orders across all pages.",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "description": "This page's number (1-based).",
            "format": "int32"
          },
          "total_pages": {
            "type": "integer",
            "description": "Number of pages, at 20 orders per page.",
            "format": "int32"
          },
          "orders": {
            "type": "array",
            "description": "The orders on this page, oldest first (by order id), as full order objects.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/OrderV2"
            }
          }
        }
      },
      "AbandonedCartV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "created_on": {
            "type": "string",
            "description": "When the cart was created, in the server's local time without a time zone (not UTC).",
            "format": "date-time"
          },
          "customer_id": {
            "type": "integer",
            "description": "Id of the customer who owns the cart.",
            "format": "int32"
          },
          "first_name": {
            "type": "string",
            "description": "The customer's first name.",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "description": "The customer's last name.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "The customer's email address.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "description": "The items in the cart.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/AbandonedCartItemV2"
            }
          }
        }
      },
      "AbandonedCartItemV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Product name.",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity in the cart.",
            "format": "int32"
          },
          "options": {
            "type": "array",
            "description": "The selected options as name/value pairs: pricing options, size, color, turnaround and parametric variables.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/NameValuePair"
            }
          },
          "thumbnail": {
            "type": "string",
            "description": "Path of the product's thumbnail image, relative to the storefront's domain.",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "basic": {
        "type": "http",
        "description": "Your API token as the username and your API key as the password.",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Authentication",
      "description": "Every REST request uses **HTTP Basic authentication** with an API token as the username and its API key as the password. (The cXML endpoint carries the same token and key inside the cXML header instead; see the cXML section.)\n\n## Getting a token and key\n\nIn the PrintNow admin, go to **Settings > API Keys** and generate a token. The admin shows the **token** and its **key** together; the key is derived from the token, so they only work as a pair. Copy both when they're shown and keep them secret.\n\n- A token/key pair works for every storefront in your PrintNow account. Use the Storefronts endpoints to find storefront ids.\n- You can have up to **5 pairs**, deactivated ones included; delete a pair to free a slot. Give each integration its own pair so you can revoke one without affecting the others.\n\n## Sending credentials\n\nCombine them as `token:key`, Base64-encode the result, and send it in the `Authorization` header of every request:\n\n```bash\ncurl https://api.printnow.com/api/v2/ping \\\n  -H \"Authorization: Basic $(printf '%s' 'YOUR_API_TOKEN:YOUR_API_KEY' | base64)\"\n```\n\nMost HTTP clients do this for you. With cURL, use `-u`:\n\n```bash\ncurl -u \"YOUR_API_TOKEN:YOUR_API_KEY\" https://api.printnow.com/api/v2/ping\n```\n\nCall **ping** first: `204 No Content` means the credentials work.\n\n## How a request is checked\n\nIn this order:\n\n1. **Credentials present.** The `Authorization` header must carry Basic credentials.\n2. **Valid pair.** The key must match the token, and the token must exist, be active, and not be deleted.\n3. **HTTPS.** Requests over plain HTTP are refused.\n4. **Rate limit.** 100 calls per 10 seconds per account (see the introduction).\n5. **Section access.** Your account must include the section of the API you're calling.\n\n## Errors\n\n| Status | Message | Cause |\n|---|---|---|\n| `401` | `Authorization credentials missing.` | No `Authorization` header, or it's empty. |\n| `401` | `Invalid key or token.` | Malformed credentials, a key that doesn't match the token, or a token that doesn't exist, is inactive or was deleted. |\n| `401` | `Invalid scheme, please use https.` | The request used HTTP. |\n| `429` | `Rate limit exceeded: 100 calls per 10 seconds.` | Too many calls; wait for `Retry-After` seconds. |\n| `403` | `Your license does not include the Orders API.` | Your account doesn't include that section (the message names it). |\n"
    },
    {
      "name": "Orders",
      "description": "Read orders, download their print files, and update their shipping and status.\n\nAn order holds the customer, billing and shipping addresses, payment details, line items (each with its selected options), shipments and the storefront's custom checkout fields. Find order ids with the storefront order search, or receive them through the `order_created` and `order_updated` webhooks.\n\n## Print files\n\nEach item's print-ready file is produced by a merge step after the order is placed. Download the files as zips:\n\n| Download | Contains |\n|---|---|\n| Order files | Every item's print files (`order-{orderId}.zip`). |\n| Item files | One item's print files (`item-{itemId}.zip`). |\n| Item assets | One item's source files: the customer's uploads for a custom-design product, or the high-resolution images used in an editor design (`item-assets-{itemId}.zip`). |\n\nUntil the files are ready, the order and item downloads answer `409 Conflict` with a `Retry-After` header (60 seconds for an order, 30 for an item). Wait that long and try again.\n\n## Shipments and split shipping\n\nEvery order has at least one shipment. When a customer splits an order across addresses, there is one shipment per address, each with its own carrier, service, charges, tracking numbers and shipped date. Each item's `shipment_index` says which shipment it belongs to. The order-level `shipping_address`, `shipping_provider` and `shipping_service` describe the primary shipment; `shipping_total` is the shipping charge for the whole order (the sum over all shipments).\n\n- **Mark an order shipped** ships every item and every shipment.\n- **Mark an item shipped** ships that item and its shipment only, so you can ship one destination of a split order at a time.\n\nBoth use the storefront's shipped status (the status that sends the \"Order Shipped\" email), send that email to the customer, and add any tracking number you pass. A storefront without a shipped status answers `400`.\n\n## Statuses\n\nSet any status configured on the storefront by name (case-insensitive), for a whole order or one item. List a storefront's statuses with the Storefronts section's status list. Each change adds an order history entry with your comments and initials, noted \"Updated via API\". You choose whether to email the customer and the vendors (both off by default). Setting the shipped status also records the shipped date.\n\nShipping and status changes fire the `order_updated` webhook.\n"
    },
    {
      "name": "Customers",
      "description": "Create, read, update, transfer and delete customer accounts on your storefronts.\n\nA customer belongs to one storefront. Usernames and email addresses are unique per storefront. Each customer also carries their organization, user groups (which drive pricing and access) and tax-exempt status, all managed in the admin.\n\n## Permanent and temporary customers\n\n- A **permanent** customer has a username, password and email, and can log in to the storefront.\n- A **temporary** (guest) customer is created with just a storefront id; PrintNow generates its credentials. Use one to let someone design and save work before they have an account. Temporary customers have `is_temporary: true`.\n\n### Guest workflow\n\n1. **Create a temporary customer:** `POST /api/v2/customer` with `storefront_id` and `is_temporary: true`.\n2. The guest browses, designs and saves projects as that customer.\n3. When they're ready to check out, either:\n   - **create their account:** `PATCH /api/v2/customer/{tempId}` with the full details (username, password, email, first and last name). The temporary customer becomes permanent, keeping its id and saved work; or\n   - **move the work to an account they already have:** `PATCH /api/v2/customer/{tempId}/transfer` with `{ \"id\": <their customer id> }`. Albums, saved projects and punchout sessions move to that customer, who must be on the same storefront.\n\n## Updating\n\n`PATCH /api/v2/customer/{id}` changes a permanent customer's password, first name, last name and company. Other fields in the body are ignored.\n\n## Webhooks\n\n| Event | Fires when |\n|---|---|\n| `customer_created` | A customer account is created (storefront registration, the admin or the API), or a temporary customer is converted into one. |\n| `customer_updated` | A customer's profile changes in the storefront, the admin or the API. |\n| `customer_deleted` | A customer is deleted through the API. The payload is the customer's last state. |\n\nCreating a temporary customer doesn't fire a webhook.\n"
    },
    {
      "name": "Products",
      "description": "Download a product's Photo Merge renderings: realistic mockup images of the product, set up on the product in the admin.\n\n1. **List the renderings** for a product id (for example an order item's `product_id`). Each has an id and a name such as \"Front View\".\n2. **Download one** by its id. The response is the PNG image, sent as an attachment named after the rendering.\n\nA product without renderings answers `404` on the list.\n"
    },
    {
      "name": "Storefronts",
      "description": "Find your storefronts and their order statuses and sales reps, search their orders, and list abandoned carts.\n\nA token/key pair covers every storefront in your PrintNow account. Start with the storefront list: most other endpoints take a storefront id.\n\n## Statuses and sales reps\n\nThe status list is the set of order statuses configured on a storefront, in order. Use a status's **id** to filter the order search and its **name** to set an order's status (Orders section). The sales rep list is the storefront's customers flagged as sales reps; use their ids to filter the order search.\n\n## Order search\n\n- 20 orders per page, oldest first. `total_results` and `total_pages` tell you how far to page.\n- Filters combine and are all optional: free text (`query`), a date range (`fromDate`/`toDate`, `YYYY-MM-DD`), statuses and sales reps (comma-separated ids), and the view: `active` (default), `archived` or `deleted`.\n- Each result is a full order, the same as the Get Order response.\n\n## Abandoned carts\n\nCarts that still hold items, belonging to permanent (not guest) customers. Choose the period either way:\n\n- `fromDate` and `toDate` together (`YYYY-MM-DD`); or\n- `recentSpan`: a number and a unit, `d` (days), `w` (weeks) or `m` (30-day months), counted back from today, for example `14d`, `2w` or `3m`. The default is 7 days. `recentSpan` is used whenever `fromDate` and `toDate` aren't both given.\n\nThe period can't start more than 180 days ago (`7m` is 210 days, so it's refused). Each cart lists its items with their options and a thumbnail path relative to the storefront's domain.\n"
    },
    {
      "name": "Reports",
      "description": "Run the same business reports as the admin's Reports pages and get the rows as JSON.\n\n## Parameters\n\nEvery report takes the same query parameters, all required:\n\n| Parameter | Meaning |\n|---|---|\n| `storefrontId` | A storefront id, or `0` for all storefronts in your account. An id that doesn't match a storefront returns no rows (not an error). |\n| `fromDate` | First day of the report, `YYYY-MM-DD`, inclusive. |\n| `toDate` | Last day of the report, `YYYY-MM-DD`, inclusive. If it's before `fromDate`, the two are swapped. |\n\nThe order report also takes `viewBy`: `day` (default), `month` or `year`.\n\nA missing parameter answers `404` (no route matches); an invalid value answers `400`.\n\n```bash\ncurl -u \"YOUR_API_TOKEN:YOUR_API_KEY\" \\\n  \"https://api.printnow.com/api/v2/report/sales?storefrontId=0&fromDate=2026-01-01&toDate=2026-01-31\"\n```\n\n## Reports\n\n| Report | One row per |\n|---|---|\n| `sales` | storefront: customers, orders, average order, sales |\n| `tax` | order: ship-to country/state, subtotal, shipping, discount, tax, total |\n| `order` | day, month or year: orders, items, sales, tax, shipping |\n| `order_details` | order: customer, addresses, sales rep, totals, shipping, tracking, status |\n| `order_item_details` | line item: customer, product, quantity, total, ship-to address, shipping |\n| `product_sales` | product: units, orders, sales |\n| `promotion_code` | promotion code: orders, discount |\n| `customer_list` | customer: account details, orders and sales in the range |\n| `customer_sales` | customer: orders and sales in the range |\n| `shipping` | carrier and service: orders, shipping charges |\n| `sales_rep` | sales rep: orders, average order, sales |\n| `saved_projects` | customer: saved projects |\n| `conversion_rate` | storefront: sessions, added to cart, reached checkout, converted |\n| `affiliates` | affiliate: referred orders, their total, commission |\n\n## Dates in report rows\n\nReport rows don't use the UTC timestamps of the rest of the API. Each date field's description says which form it uses:\n\n- **Timestamps** such as the tax and order details `order_date`, the customer list's login and creation dates, and order item `shipped_on`: ISO 8601 in the server's local time, without a time zone (`2026-01-15T09:30:00`).\n- **Plain dates** such as the order item details `order_date`, the customer sales login and creation dates, and promotion `expiration`: `M/D/YYYY` text (`1/15/2026`). The order report's `period` is `M/D/YYYY`, `M/YYYY` or `YYYY`, depending on `viewBy`.\n"
    },
    {
      "name": "Webhooks",
      "description": "Get notified when orders and customers change, instead of polling. Subscribe a URL to an event and PrintNow POSTs the changed order or customer to it each time the event happens. This is also how the Zapier integration works.\n\n## Events\n\n| Event | Fires when | Payload |\n|---|---|---|\n| `order_created` | An order is placed on a storefront. | Order |\n| `order_updated` | An order changes in the storefront, the admin or the API: for example its status, shipping or items. | Order |\n| `order_deleted` | An order is deleted in the admin. | Order (its last state) |\n| `customer_created` | A customer account is created: storefront registration, the admin, the API, or a guest converted to an account. | Customer |\n| `customer_updated` | A customer's profile changes in the storefront, the admin or the API. | Customer |\n| `customer_deleted` | A customer is deleted through the API. | Customer (its last state) |\n\n## Deliveries\n\nEach delivery is an HTTP `POST` to your `target_url` with `Content-Type: application/json`. The body is a JSON array holding one object: the order or customer in exactly the shape the Get Order and Get Customer endpoints return, so the same parsing works for both. The callbacks on the subscribe endpoint document each event's payload.\n\n- Answer with any `2xx` status to acknowledge the delivery.\n- Answer `410 Gone` to unsubscribe: PrintNow removes the subscription. (Zapier uses this when a Zap is turned off.)\n- Your endpoint must be reachable from PrintNow. Firewalls are the most common reason deliveries don't arrive.\n\n### PrintNow's outgoing addresses\n\nIf your endpoint sits behind a firewall or VPN, allow these addresses. The list can change as PrintNow's infrastructure grows; contact PrintNow Support if you need it confirmed.\n\n| | | | |\n|---|---|---|---|\n| `20.112.217.230` | `20.112.218.61` | `20.112.218.123` | `20.112.219.45` |\n| `20.112.217.240` | `20.112.218.78` | `20.112.218.126` | `20.112.219.47` |\n| `20.112.217.249` | `20.112.218.80` | `20.112.218.148` | `20.112.219.51` |\n| `20.112.217.253` | `20.112.218.93` | `20.112.218.150` | `20.112.219.52` |\n| `20.112.218.17` | `20.112.218.113` | `20.112.218.152` | `20.112.219.54` |\n| `20.112.218.30` | `20.112.218.117` | `20.112.218.204` | `20.112.219.73` |\n| `20.112.218.38` | `20.112.218.118` | `20.112.219.36` | `20.118.56.5` |\n| `20.112.218.57` | `20.112.218.120` | `20.112.219.40` | `52.189.72.76` |\n\n## Subscriptions belong to an API key\n\nSubscriptions are created, listed and removed per API key: each key sees and manages only its own. A target URL can be subscribed once per key, so use a different URL for each event you subscribe to.\n\nDeactivating or deleting an API key (in the admin's **Settings > API Keys**) stops its subscriptions' deliveries. Reactivating the key resumes them.\n\n## Lifecycle\n\n1. **Subscribe:** `POST /api/v2/hooks` with `target_url` and `event`. The response holds the subscription's `id`.\n2. **Receive** deliveries and answer `2xx`.\n3. **Unsubscribe:** `DELETE /api/v2/hooks/{id}`, or answer a delivery with `410 Gone`.\n"
    },
    {
      "name": "cXML",
      "description": "Connect e-procurement platforms and print MIS systems to PrintNow with cXML: punchout sessions where buyers design products on your storefront, and order submission.\n\n## Endpoint\n\n`POST https://api.printnow.com/cxml`, **not** under `/api/v2/`.\n\n- Send the cXML document as the body with `Content-Type: application/xml` (anything else answers `415`).\n- The root element must be in the namespace `http://tempuri.org/cXML` (`<cXML xmlns=\"http://tempuri.org/cXML\" ...>`). A document PrintNow can't read as cXML answers `406`.\n- The HTTP status is always `200`. The outcome is the `code` of the response envelope's `<Status>` element (see Status codes).\n\n## Credentials\n\ncXML doesn't use the `Authorization` header. The credentials go in the envelope's `<Header>`:\n\n| Element | Contains |\n|---|---|\n| `<From>` | The storefront: a `<Credential>` whose `domain` and `<Identity>` match the storefront's **Punchout ID Type** and **Punchout ID** set in the admin. |\n| `<To>` | PrintNow: `domain=\"DUNS\"` with identity `157519294`. |\n| `<Sender>` | Your API token as `<Identity>` and API key as `<SharedSecret>`, with `domain=\"api.printnow.com\"`. The same pair you use for the REST API. |\n\n```xml\n<Header>\n  <From><Credential domain=\"NetworkID\"><Identity>AN01000000001</Identity></Credential></From>\n  <To><Credential domain=\"DUNS\"><Identity>157519294</Identity></Credential></To>\n  <Sender>\n    <Credential domain=\"api.printnow.com\">\n      <Identity>YOUR_API_TOKEN</Identity>\n      <SharedSecret>YOUR_API_KEY</SharedSecret>\n    </Credential>\n  </Sender>\n</Header>\n```\n\nCommon Punchout ID Types: `DUNS` (a DUNS number such as `123456789`), `NetworkID` (an Ariba Network id such as `AN01000000001`), or a custom domain identifying your procurement system.\n\ncXML calls count toward the same rate limit as the REST API.\n\n## Request types\n\n| Request | Response | Use |\n|---|---|---|\n| `ProfileRequest` | `ProfileResponse` | Discover what PrintNow supports. |\n| `PunchOutSetupRequest` | `PunchOutSetupResponse` | Start (`create`) or resume (`edit`) a punchout session; returns the URL to send the buyer to. |\n| `OrderRequest` | Status only | Submit an order. |\n\n### ProfileRequest\n\nReturns two transactions, both at `https://api.printnow.com/cxml`: `PunchOutSetupRequest` (options `operationAllowed: create edit`, and `Flow`, `UsePricing`, `ItemNumber`, `ModelNumber`, `IntegrationId`, `CategoryId`) and `OrderRequest`.\n\n## Punchout sessions\n\nA `PunchOutSetupRequest` with `operation=\"create\"` starts a session; the response's `StartPage` URL opens the storefront for the buyer.\n\n### Flows\n\nThe `Flow` extrinsic decides where the buyer lands:\n\n| Flow | Needs | Buyer sees |\n|---|---|---|\n| `product` | One of `ItemNumber`, `ModelNumber` or `IntegrationId` | That product, open in the editor. |\n| `category` | `CategoryId` | That category, to choose a product from. |\n\nSend product identifiers or a category, not both (`400` otherwise).\n\n### Setup extrinsics\n\n| Extrinsic | Required | Meaning |\n|---|---|---|\n| `Flow` | Yes | `product` or `category`. |\n| `ItemNumber` / `ModelNumber` / `IntegrationId` | For `product` | Identifies the product. |\n| `CategoryId` | For `category` | The category to browse. |\n| `UsePricing` | No | `true` (lowercase) to price the design with PrintNow pricing (product flow). |\n| `ConfigId` | On `edit` | The session to resume: the `ConfigId` from the order message. |\n| `EditorParam.<name>` | No, repeatable | A value for the editor, returned on the order message (see Editor parameters). |\n\n### The buyer\n\nThe end user comes from the request's `<Contact role=\"endUser\">`:\n\n1. An existing customer on the storefront with the contact's email address is used;\n2. otherwise a customer account is created from the contact's name and email;\n3. without a contact, a temporary customer is created.\n\nCreating a customer fires the `customer_created` webhook.\n\n### Editing a session\n\n`operation=\"edit\"` reopens a session, but only when all of these match the original `create`, otherwise it answers `404`:\n\n- the `ConfigId` extrinsic;\n- the `BuyerCookie`;\n- the `BrowserFormPost` URL;\n- the API token in `<Sender>`.\n\nNothing else is needed: `Flow`, product identifiers, `UsePricing` and `Contact` are ignored on an edit. The editor reopens the saved design with the buyer's changes.\n\n### Editor parameters\n\nEditor parameters pass values into the Print Editor on a `create` request: swap a tagged image, show or hide it, or recolor it from the storefront's palette. Their values come back on the order message, so they also carry your own identifiers through the session.\n\n**Naming.** Send each as an extrinsic named `EditorParam.<name>`, for example `EditorParam.Background`. The `EditorParam.` prefix is case-insensitive; `<name>` is case-sensitive and must exactly match the tag of an image in the product template to affect the design.\n\n**What the value does:**\n\n| Value | Effect on the tagged image | Example |\n|---|---|---|\n| A number | Swaps it to that image id. | `EditorParam.Logo` = `1234` |\n| `true` / `false` | Shows or hides it. | `EditorParam.Badge` = `false` |\n| `from,to` pairs separated by `;` | Recolors it: each `from` color in its color map becomes `to`. | `EditorParam.Background` = `Red,Blue;White,Black` |\n\n**Colors** are palette color names or hex values (with or without `#`), case-insensitive. Both colors of a pair must be in the storefront's palette, or the pair is ignored. A pair recolors a color-map entry when its `from` matches the original artwork color or the current one.\n\n**Your own values.** A name that matches no tagged image has no effect in the editor and comes back unchanged, so `EditorParam.correlationId` round-trips your own id. Only `EditorParam.` extrinsics come back; other extrinsics don't.\n\n**Reserved names** are refused with `400`, as is an empty name (`EditorParam.`), case-insensitively: `productid`, `epi`, `epw`, `tpsc`, `token`, `cru`, `s`, `uid`, `qty`.\n\n**Create only.** On an `edit`, editor parameters are checked for reserved names and then ignored: the original parameters aren't re-applied, and you can't supply a new value (such as a new correlation id).\n\n## The order message\n\nWhen the buyer finishes, PrintNow posts a `PunchOutOrderMessage` back to the setup request's `BrowserFormPost` URL, as a browser form field named `cxml-urlencoded`. The `BuyerCookie` comes back unchanged.\n\nEach design is one `ItemIn`: `quantity` is the ordered quantity, `SupplierPartID` the PrintNow product id, `Description` the product's short description, `UnitOfMeasure` is `EA`, and `UnitPrice` and the header `Total` are included when PrintNow pricing is used.\n\n| ItemIn extrinsic | Present | Value |\n|---|---|---|\n| `ConfigId` | Always | The session id. Send it back to edit. |\n| `ProofUrl` | Always | Download link for the proof PDF. |\n| `ThumbnailUrl` | Always | Product thumbnail image. |\n| `ProductId` | Always | PrintNow product id. |\n| `ItemNumber` / `ModelNumber` / `IntegrationId` | When set on the product | The product's identifiers. |\n| `StandardSize` or `CustomSize` | With PrintNow pricing | Size name, or `W x H`. |\n| `Colors` | With PrintNow pricing | Color/pages selection. |\n| One per pricing option, named after the option | With PrintNow pricing | The selected value. |\n| `Weight` | With PrintNow pricing, when above 0 | Calculated weight. |\n| `EditorParam.<name>` | One per editor parameter sent at setup | Its value now (below). |\n\n**Returned editor parameter values.** Every `EditorParam.<name>` sent on the create comes back on each `ItemIn` under the same name. A name the editor matched carries its current value, reflecting the buyer's changes; any other name carries the original value:\n\n- image swap: the current image id;\n- show/hide: `true` when visible, `false` when hidden;\n- recolor: `original,current` pairs separated by `;`, covering the image's whole color map (not just the pairs sent). Each color is a palette name when it's in the palette, otherwise bare hex without `#`: `Red,123456` means the buyer picked a color outside the palette. The value can differ from what you sent even when nothing changed.\n\n## Orders\n\nAn `OrderRequest` creates the order in PrintNow:\n\n1. **Customer:** found or created from `<Contact>`, as for punchout.\n2. **Order:** created with the storefront's first order status.\n3. **Totals:** from `<Total>`, `<Tax>` and `<Shipping>`; the item subtotal is the total minus tax and shipping.\n4. **Addresses:** billing from `<BillTo>`, shipping from `<ShipTo>` (the billing address when there's none).\n5. **Items:** each `<ItemOut>` becomes an order item. When its `SupplierPartID` is a PrintNow product and its `ConfigId` extrinsic links to a punchout session, the session's PrintNow pricing (size, color, turnaround, options) is attached; otherwise an external product is recorded from the part id and description.\n6. **Files:** print-file generation starts.\n7. **Webhook:** `order_created` fires.\n\n### Address extrinsics\n\nOptional extrinsics on a `<PostalAddress>`:\n\n| Extrinsic | Meaning |\n|---|---|\n| `CustomerCompany` | Company name for the address (otherwise the `<Address>` name). |\n| `CustomerName` | Contact name (otherwise `<DeliverTo>` is split into first and last name). |\n| `IsResidential` | `true`, `1` or `yes` for a residential address (affects shipping rates). |\n\n## Status codes\n\n| Code | Meaning |\n|---|---|\n| `200` | Processed. |\n| `400` | Invalid request: a flow/product/category mix-up, missing data, an invalid `EditorParam` name, or a customer that couldn't be created. |\n| `401` | Bad credentials: API token/key, PrintNow's DUNS, or no storefront matching `<From>`. |\n| `403` | Your account doesn't include cXML. |\n| `404` | Punchout session not found on an edit, or its `BuyerCookie`, `BrowserFormPost` URL or API token doesn't match the create. |\n| `406` | Not a readable cXML document (empty, or not in the `http://tempuri.org/cXML` namespace). |\n| `415` | `Content-Type` isn't `application/xml`. |\n| `429` | Rate limit exceeded; wait for the HTTP `Retry-After` header. |\n| `501` | Request type or operation not supported. |\n"
    }
  ]
}