{"items":[{"type":"link","label":"Onward API","link":"/apis/onward","routeSlug":"/apis/onward","content":{"contentType":"overview","meta":{"name":"Onward API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"onward.json","url":"/_bundle/apis/onward.json?download"},{"kind":"download","label":"onward.yaml","url":"/_bundle/apis/onward.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"email","title":"E-mail","titleTranslationKey":"info.contact.name","email":"help@useonward.com","label":"help@useonward.com","withCopyButton":true,"copyContent":"help@useonward.com"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://useonward.com/terms-and-conditions"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://app.useonward.com/api/v1"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Onward API (1.0.0)","showPageActions":true}],"sectionId":"/"}]}]}},{"type":"group","label":"Customers","link":"/apis/onward/customers","routeSlug":"/apis/onward/customers","items":[{"label":"Create a customer","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/customers/createcustomer","routeSlug":"/apis/onward/customers/createcustomer","metadata":{"seo":{"title":"Create a customer","description":"Creates a customer so you can open a reward for them before they have ever ordered. shop_customer_id is required, along with at least one of first_name, last_name, email or phone_number. The orders Onward later ingests for that customer update this same record instead of creating another."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createCustomer","name":"Create a customer","isWebhook":false,"pointer":"/paths/~1customers/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a customer","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creates a customer so you can open a reward for them before they have ever ordered. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is required, along with at least one of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"first_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"last_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"email"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"phone_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The orders Onward later ingests for that customer update this same record instead of creating another."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A customer that already exists returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"409"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with no body, and nothing is written. Treat "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"201"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"409"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" alike: both mean the customer now exists. Read it with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /customers/{shopCustomerId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" if you need the record after a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"409"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1customers/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Customer"}},"schemaId":"components/schemas/Customer","pointer":"/paths/~1customers/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/customers","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/Customer"}},"responseCodes":["201","400","401","409","422"],"pointer":"/customers","href":"customers/createcustomer","openApiOperationId":"createCustomer","summary":"Create a customer"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/Customer","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Customer"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"The customer was created.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CustomerWithRewards"}},"schemaId":"components/schemas/CustomerWithRewards"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"409","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A customer with this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" already exists. Nothing was written."},"children":[]}]}]}]},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is missing or blank, none of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"first_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"last_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"email"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"phone_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is present, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"email"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is present but not a valid address, or a field is longer than 255 characters. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"errors"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" lists every problem found."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1customers/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/CustomerWithRewards","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CustomerWithRewards"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/customers/createcustomer"}],"panels":[]}]},"httpPath":"/customers"},{"label":"Read a customer and their rewards","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/customers/getcustomerrewards","routeSlug":"/apis/onward/customers/getcustomerrewards","metadata":{"seo":{"title":"Read a customer and their rewards","description":"Returns the customer together with every reward they hold. rewards is an array so a customer can hold multiple independent rewards in future; today it holds at most one, and a customer with no reward returns [] rather than an error. shop_reward_id is null when there is no discount to address the reward by. A 404 means the customer does not exist."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getCustomerRewards","name":"Read a customer and their rewards","isWebhook":false,"pointer":"/paths/~1customers~1{shopCustomerId}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Read a customer and their rewards","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the customer together with every reward they hold. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is an array so a customer can hold multiple independent rewards in future; today it holds at most one, and a customer with no reward returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" rather than an error. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_reward_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when there is no discount to address the reward by. A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"404"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" means the customer does not exist."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopCustomerId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The customer's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1customers~1{shopCustomerId}/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1customers~1{shopCustomerId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/customers/{shopCustomerId}","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopCustomerId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","401","404"],"pointer":"/customers/{shopCustomerId}","href":"customers/getcustomerrewards","openApiOperationId":"getCustomerRewards","summary":"Read a customer and their rewards"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CustomerWithRewards"}},"schemaId":"components/schemas/CustomerWithRewards"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"No customer with that identifier."}],"pointer":"/paths/~1customers~1{shopCustomerId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/CustomerWithRewards","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CustomerWithRewards"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/customers/getcustomerrewards"}],"panels":[]}]},"httpPath":"/customers/{shopCustomerId}"}],"content":{"contentType":"group","meta":{"name":"Customers"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Customers","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your customers, identified by the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" you send on their orders."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/customers","summary":"Create a customer","prefix":{"name":"post","color":"post"},"badges":[],"link":"/customers/createcustomer","deprecated":false},{"title":"/customers/{shopCustomerId}","summary":"Read a customer and their rewards","prefix":{"name":"get","color":"get"},"badges":[],"link":"/customers/getcustomerrewards","deprecated":false}]}]}]}]}},{"type":"group","label":"Orders","link":"/apis/onward/orders","routeSlug":"/apis/onward/orders","items":[{"label":"List orders","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/orders/listorders","routeSlug":"/apis/onward/orders/listorders","metadata":{"seo":{"title":"List orders","description":"Paginate through your orders, most-recent first. Use cursor for keyset pagination and optionally filter by the order's created_at with created_after and created_before."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listOrders","name":"List orders","isWebhook":false,"pointer":"/paths/~1orders/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List orders","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Paginate through your orders, most-recent first. Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for keyset pagination and optionally filter by the order's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_after"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_before"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"created_after","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only return orders whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is at or after this time. Must be a valid ISO 8601 / RFC 3339 timestamp with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or a numeric offset such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"2024-11-01T00:00:00Z"},{"name":"created_before","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only return orders whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is at or before this time. Must be a valid ISO 8601 / RFC 3339 timestamp with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or a numeric offset such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"2024-11-30T23:59:59Z"},{"name":"cursor","in":"query","schemaId":"schema_2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Return orders that come after this cursor. Pass the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"next_cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from the previous response to fetch the next page. Omit to start from the most recent order."},"children":[]}]}]}]}],"pointer":"/paths/~1orders/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1orders/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/orders","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[{"name":"created_after","in":"query","required":false,"example":"2024-11-01T00:00:00Z","schemaId":"schema_1"},{"name":"created_before","in":"query","required":false,"example":"2024-11-30T23:59:59Z","schemaId":"schema_1"},{"name":"cursor","in":"query","required":false,"schemaId":"schema_2"}],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","400","401"],"pointer":"/orders","href":"orders/listorders","openApiOperationId":"listOrders","summary":"List orders"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A page of orders","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/OrderList"}},"schemaId":"components/schemas/OrderList"},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A query parameter was invalid (e.g. an unparseable created_after / created_before timestamp)."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"}],"pointer":"/paths/~1orders/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/OrderList","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/OrderList"}}},{"code":"400","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/listorders"}],"panels":[]}]},"httpPath":"/orders"},{"label":"Create an order","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/orders/createorder","routeSlug":"/apis/onward/orders/createorder","metadata":{"seo":{"title":"Create an order","description":"When a customer places an order in your e-comm platform, create that order with its details in Onward."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createOrder","name":"Create an order","isWebhook":false,"pointer":"/paths/~1orders/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create an order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When a customer places an order in your e-comm platform, create that order with its details in Onward."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1orders/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CreateOrderInput"}},"schemaId":"components/schemas/CreateOrderInput","pointer":"/paths/~1orders/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/CreateOrderInput"}},"responseCodes":["201","400","401","409","422"],"pointer":"/orders","href":"orders/createorder","openApiOperationId":"createOrder","summary":"Create an order"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/CreateOrderInput","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CreateOrderInput"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Order created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}},"schemaId":"components/schemas/Order"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"409","description":"Order already exists"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1orders/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/Order","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/createorder"}],"panels":[]}]},"httpPath":"/orders"},{"label":"Update an order","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/orders/updateorder","routeSlug":"/apis/onward/orders/updateorder","metadata":{"seo":{"title":"Update an order","description":"When order details change in your e-comm platform, update the order in Onward."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateOrder","name":"Update an order","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update an order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When order details change in your e-comm platform, update the order in Onward."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopOrderId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique ID for the Order (the same shop_order_id you sent when creating it)"},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{shopOrderId}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1orders~1{shopOrderId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/UpdateOrderInput"}},"schemaId":"components/schemas/UpdateOrderInput","pointer":"/paths/~1orders~1{shopOrderId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/orders/{shopOrderId}","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/UpdateOrderInput"}},"responseCodes":["200","400","401","404","422"],"pointer":"/orders/{shopOrderId}","href":"orders/updateorder","openApiOperationId":"updateOrder","summary":"Update an order"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/UpdateOrderInput","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/UpdateOrderInput"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Order updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}},"schemaId":"components/schemas/Order"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1orders~1{shopOrderId}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Order","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/updateorder"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}"},{"label":"Mark an order's protection as refunded","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/orders/refundprotection","routeSlug":"/apis/onward/orders/refundprotection","metadata":{"seo":{"title":"Mark an order's protection as refunded","description":"When you refund the customer for the protection amount in your e-comm platform, update the order's protection status in Onward."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"refundProtection","name":"Mark an order's protection as refunded","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/patch","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Mark an order's protection as refunded","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When you refund the customer for the protection amount in your e-comm platform, update the order's protection status in Onward."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopOrderId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique ID for the Order (the same shop_order_id you sent when creating it)"},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/patch/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/orders/{shopOrderId}/refund_protection","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","400","401","404","422"],"pointer":"/orders/{shopOrderId}/refund_protection","href":"orders/refundprotection","openApiOperationId":"refundProtection","summary":"Mark an order's protection as refunded"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Protection refunded successfully"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200"},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/refundprotection"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/refund_protection"},{"label":"Add protection to an existing order","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/orders/addprotection","routeSlug":"/apis/onward/orders/addprotection","metadata":{"seo":{"title":"Add protection to an existing order","description":"If the customer did not purchase protection during checkout, you can merchant-protect an order after-the-fact with this endpoint. Note: it is very important that you verify the status code of this request as not every order is eligible for protection."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"addProtection","name":"Add protection to an existing order","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1add_protection/patch","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Add protection to an existing order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"If the customer did not purchase protection during checkout, you can merchant-protect an order after-the-fact with this endpoint. Note: it is very important that you verify the status code of this request as not every order is eligible for protection."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopOrderId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique ID for the Order (the same shop_order_id you sent when creating it)"},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{shopOrderId}~1add_protection/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1orders~1{shopOrderId}~1add_protection/patch/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/orders/{shopOrderId}/add_protection","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","400","401","404","422"],"pointer":"/orders/{shopOrderId}/add_protection","href":"orders/addprotection","openApiOperationId":"addProtection","summary":"Add protection to an existing order"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Protection added successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}},"schemaId":"components/schemas/Order"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"Order not found"},{"code":"422","description":"Could not add protection","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1orders~1{shopOrderId}~1add_protection/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Order","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Order"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/addprotection"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/add_protection"}],"content":{"contentType":"group","meta":{"name":"Orders"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Orders","showPageActions":true},{"nodeType":"markdoc","content":"Your customers orders, including the information necessary for Onward to protect and handle claims."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/orders","summary":"List orders","prefix":{"name":"get","color":"get"},"badges":[],"link":"/orders/listorders","deprecated":false},{"title":"/orders","summary":"Create an order","prefix":{"name":"post","color":"post"},"badges":[],"link":"/orders/createorder","deprecated":false},{"title":"/orders/{shopOrderId}","summary":"Update an order","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/orders/updateorder","deprecated":false},{"title":"/orders/{shopOrderId}/refund_protection","summary":"Mark an order's protection as refunded","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/orders/refundprotection","deprecated":false},{"title":"/orders/{shopOrderId}/add_protection","summary":"Add protection to an existing order","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/orders/addprotection","deprecated":false}]}]}]}]}},{"type":"group","label":"Shipments","link":"/apis/onward/shipments","routeSlug":"/apis/onward/shipments","items":[{"label":"Create a shipment","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/shipments/createshipment","routeSlug":"/apis/onward/shipments/createshipment","metadata":{"seo":{"title":"Create a shipment","description":"When a you ship items for an order, create that shipment in Onward."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createShipment","name":"Create a shipment","isWebhook":false,"pointer":"/paths/~1shipments/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a shipment","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When a you ship items for an order, create that shipment in Onward."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1shipments/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Shipment"}},"schemaId":"components/schemas/Shipment","pointer":"/paths/~1shipments/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/shipments","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/Shipment"}},"responseCodes":["201","400","401","409","422"],"pointer":"/shipments","href":"shipments/createshipment","openApiOperationId":"createShipment","summary":"Create a shipment"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/Shipment","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Shipment"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Shipment created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shipment"}},"schemaId":"components/schemas/Shipment"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"409","description":"Shipment already exists"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1shipments/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/Shipment","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shipment"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/shipments/createshipment"}],"panels":[]}]},"httpPath":"/shipments"},{"label":"Update a shipment","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/shipments/updateshipment","routeSlug":"/apis/onward/shipments/updateshipment","metadata":{"seo":{"title":"Update a shipment","description":"When shipment details change in your e-comm platform, update the shipment in Onward."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateShipment","name":"Update a shipment","isWebhook":false,"pointer":"/paths/~1shipments~1{shopShipmentId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a shipment","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When shipment details change in your e-comm platform, update the shipment in Onward."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopShipmentId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique ID for the Shipment (the same shop_shipment_id you sent when creating it)"},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1shipments~1{shopShipmentId}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1shipments~1{shopShipmentId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Shipment"}},"schemaId":"components/schemas/Shipment","pointer":"/paths/~1shipments~1{shopShipmentId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/shipments/{shopShipmentId}","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopShipmentId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/Shipment"}},"responseCodes":["200","400","401","404","422"],"pointer":"/shipments/{shopShipmentId}","href":"shipments/updateshipment","openApiOperationId":"updateShipment","summary":"Update a shipment"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/Shipment","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/Shipment"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Shipment updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shipment"}},"schemaId":"components/schemas/Shipment"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"Shipment not found"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1shipments~1{shopShipmentId}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Shipment","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shipment"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/shipments/updateshipment"}],"panels":[]}]},"httpPath":"/shipments/{shopShipmentId}"},{"label":"Create a shipment event","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/shipments/createshipmentevent","routeSlug":"/apis/onward/shipments/createshipmentevent","metadata":{"seo":{"title":"Create a shipment event","description":"When a shipment status changes (e.g. it is shipped or out for delivery), notify Onward of that event."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createShipmentEvent","name":"Create a shipment event","isWebhook":false,"pointer":"/paths/~1shipments~1{shopShipmentId}~1events/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a shipment event","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"When a shipment status changes (e.g. it is shipped or out for delivery), notify Onward of that event."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopShipmentId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique ID for the Shipment (the same shop_shipment_id you sent when creating it)"},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1shipments~1{shopShipmentId}~1events/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1shipments~1{shopShipmentId}~1events/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/ShipmentEvent"}},"schemaId":"components/schemas/ShipmentEvent","pointer":"/paths/~1shipments~1{shopShipmentId}~1events/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/shipments/{shopShipmentId}/events","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopShipmentId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/ShipmentEvent"}},"responseCodes":["201","400","401","404","409","422"],"pointer":"/shipments/{shopShipmentId}/events","href":"shipments/createshipmentevent","openApiOperationId":"createShipmentEvent","summary":"Create a shipment event"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/ShipmentEvent","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/ShipmentEvent"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Shipment event created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ShipmentEvent"}},"schemaId":"components/schemas/ShipmentEvent"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"Shipment not found"},{"code":"409","description":"Shipment event already exists"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1shipments~1{shopShipmentId}~1events/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/ShipmentEvent","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ShipmentEvent"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/shipments/createshipmentevent"}],"panels":[]}]},"httpPath":"/shipments/{shopShipmentId}/events"}],"content":{"contentType":"group","meta":{"name":"Shipments"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Shipments","showPageActions":true},{"nodeType":"markdoc","content":"Physical shipments of items within an order and their tracking events."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/shipments","summary":"Create a shipment","prefix":{"name":"post","color":"post"},"badges":[],"link":"/shipments/createshipment","deprecated":false},{"title":"/shipments/{shopShipmentId}","summary":"Update a shipment","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/shipments/updateshipment","deprecated":false},{"title":"/shipments/{shopShipmentId}/events","summary":"Create a shipment event","prefix":{"name":"post","color":"post"},"badges":[],"link":"/shipments/createshipmentevent","deprecated":false}]}]}]}]}},{"type":"group","label":"Quotes","link":"/apis/onward/quotes","routeSlug":"/apis/onward/quotes","items":[{"label":"Get a protection quote","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/quotes/createquote","routeSlug":"/apis/onward/quotes/createquote","metadata":{"seo":{"title":"Get a protection quote","description":"During check out, get the protection quote amount for the cart and add that amount to the order."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createQuote","name":"Get a protection quote","isWebhook":false,"pointer":"/paths/~1quotes/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get a protection quote","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"During check out, get the protection quote amount for the cart and add that amount to the order."},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1quotes/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_3"}},"schemaId":"schema_3","pointer":"/paths/~1quotes/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/quotes","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_3"}},"responseCodes":["201","400","401","422"],"pointer":"/quotes","href":"quotes/createquote","openApiOperationId":"createQuote","summary":"Get a protection quote"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_3"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Quote"}},"schemaId":"components/schemas/Quote"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"422","description":"Validation exception","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1quotes/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/Quote","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Quote"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/quotes/createquote"}],"panels":[]}]},"httpPath":"/quotes"}],"content":{"contentType":"group","meta":{"name":"Quotes"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Quotes","showPageActions":true},{"nodeType":"markdoc","content":"Protection quotes for customers during checkout."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/quotes","summary":"Get a protection quote","prefix":{"name":"post","color":"post"},"badges":[],"link":"/quotes/createquote","deprecated":false}]}]}]}]}},{"type":"group","label":"Claims","link":"/apis/onward/claims","routeSlug":"/apis/onward/claims","items":[{"label":"List claims","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/claims/listclaims","routeSlug":"/apis/onward/claims/listclaims","metadata":{"seo":{"title":"List claims","description":"Paginate through your claims, most-recent first. Use cursor for keyset pagination and optionally filter by the claim's created_at with created_after and created_before."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listClaims","name":"List claims","isWebhook":false,"pointer":"/paths/~1claims/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List claims","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Paginate through your claims, most-recent first. Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for keyset pagination and optionally filter by the claim's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_after"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_before"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"created_after","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only return claims whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is at or after this time. Must be a valid ISO 8601 / RFC 3339 timestamp with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or a numeric offset such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"2024-11-01T00:00:00Z"},{"name":"created_before","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only return claims whose "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"created_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is at or before this time. Must be a valid ISO 8601 / RFC 3339 timestamp with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or a numeric offset such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"2024-11-30T23:59:59Z"},{"name":"cursor","in":"query","schemaId":"schema_2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Return claims that come after this cursor. Pass the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"next_cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from the previous response to fetch the next page. Omit to start from the most recent claim."},"children":[]}]}]}]}],"pointer":"/paths/~1claims/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1claims/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/claims","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[{"name":"created_after","in":"query","required":false,"example":"2024-11-01T00:00:00Z","schemaId":"schema_1"},{"name":"created_before","in":"query","required":false,"example":"2024-11-30T23:59:59Z","schemaId":"schema_1"},{"name":"cursor","in":"query","required":false,"schemaId":"schema_2"}],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","400","401"],"pointer":"/claims","href":"claims/listclaims","openApiOperationId":"listClaims","summary":"List claims"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A page of claims","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ClaimList"}},"schemaId":"components/schemas/ClaimList"},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A query parameter was invalid (e.g. an unparseable created_after / created_before timestamp)."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"}],"pointer":"/paths/~1claims/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/ClaimList","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ClaimList"}}},{"code":"400","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/claims/listclaims"}],"panels":[]}]},"httpPath":"/claims"}],"content":{"contentType":"group","meta":{"name":"Claims"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Claims","showPageActions":true},{"nodeType":"markdoc","content":"Protection claims filed against your orders."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/claims","summary":"List claims","prefix":{"name":"get","color":"get"},"badges":[],"link":"/claims/listclaims","deprecated":false}]}]}]}]}},{"type":"group","label":"Rewards","link":"/apis/onward/rewards","routeSlug":"/apis/onward/rewards","items":[{"label":"Create a customer's reward, with its opening entry","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/rewards/createcustomerreward","routeSlug":"/apis/onward/rewards/createcustomerreward","metadata":{"seo":{"title":"Create a customer's reward, with its opening entry","description":"A reward cannot be opened empty — the discount is created from the balance, and a zero balance produces an already-expired code — so the reward is opened together with its first entry. The customer must already exist; an unknown customer returns 404. Create them with POST /customers and retry."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createCustomerReward","name":"Create a customer's reward, with its opening entry","isWebhook":false,"pointer":"/paths/~1customers~1{shopCustomerId}~1rewards/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a customer's reward, with its opening entry","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A reward cannot be opened empty — the discount is created from the balance, and a zero balance produces an already-expired code — so the reward is opened together with its first entry. The customer must already exist; an unknown customer returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"404"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Create them with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /customers"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and retry."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrying is safe. The opening entry is de-duplicated on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" exactly like any other entry, so a retry after a timeout returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"200"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with the existing reward and the entry applied once, never twice. A customer who already holds a reward gets that same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"200"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" rather than a second reward. Note this differs from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /rewards/{shopRewardId}/transactions"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", which returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"409"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for an already-recorded entry."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopCustomerId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The customer's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_customer_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1customers~1{shopCustomerId}~1rewards/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1customers~1{shopCustomerId}~1rewards/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"schemaId":"components/schemas/RewardTransactionInput","pointer":"/paths/~1customers~1{shopCustomerId}~1rewards/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/customers/{shopCustomerId}/rewards","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopCustomerId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"responseCodes":["200","201","400","401","404","409","422"],"pointer":"/customers/{shopCustomerId}/rewards","href":"rewards/createcustomerreward","openApiOperationId":"createCustomerReward","summary":"Create a customer's reward, with its opening entry"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/RewardTransactionInput","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"The customer already held a reward, or this entry was already recorded.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Reward"}},"schemaId":"components/schemas/Reward"},{"code":"201","description":"The reward was opened.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Reward"}},"schemaId":"components/schemas/Reward"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"No customer with that identifier."},{"code":"409","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is already recorded against a different customer. It is unique per shop, so this is a collision rather than a retry — nothing was written for this customer."},"children":[]}]}]}]},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The entry was rejected and must not be retried unchanged. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"errors"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" carries one of the stable codes "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"insufficient_balance"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (a reversal would drive the balance below zero), "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"currency_mismatch"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (the amount's currency differs from the reward's), "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"issues_at_not_future"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards_not_supported_for_platform"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (the shop is not on a platform that can hold rewards — this will never succeed). A malformed body returns descriptive messages instead, including for a zero amount, an amount beyond the supported range, an unknown currency, a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" longer than 255 characters, and a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"source_details"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object that is oversized, over-keyed, or not a flat object of strings."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1customers~1{shopCustomerId}~1rewards/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Reward","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Reward"}}},{"code":"201","schemaId":"components/schemas/Reward","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Reward"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/rewards/createcustomerreward"}],"panels":[]}]},"httpPath":"/customers/{shopCustomerId}/rewards"},{"label":"Add or reverse an entry","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/rewards/createrewardtransaction","routeSlug":"/apis/onward/rewards/createrewardtransaction","metadata":{"seo":{"title":"Add or reverse an entry","description":"There is no type or direction field. A positive amount issues credit and a negative one reverses credit previously issued; issues_at decides whether it is spendable now or later. Redemption is never posted through this API — Onward owns it through the discount code — so classification is derived on our side and returned for information only."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createRewardTransaction","name":"Add or reverse an entry","isWebhook":false,"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Add or reverse an entry","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"There is no type or direction field. A positive "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" issues credit and a negative one reverses credit previously issued; "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"issues_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" decides whether it is spendable now or later. Redemption is never posted through this API — Onward owns it through the discount code — so "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"classification"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is derived on our side and returned for information only."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To reverse an entry that is still pending issuance, post the negative amount carrying that entry's future "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"issues_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"; omit "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"issues_at"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to reverse credit that has already issued."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopRewardId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The ID of the parent discount that the reward is tied to — not the discount code, and not one of Onward's internal IDs. Read it from the customer's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array. Onward rewrites this value if it has to recreate a discount that was deleted, so treat a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"404"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" here as a signal to re-read "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /customers/{shopCustomerId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and pick up the current value."},"children":[]}]}]}],"required":true,"example":"1234567890"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"Content-Type must be application/json","required":true,"example":"application/json"},{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"schemaId":"components/schemas/RewardTransactionInput","pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/rewards/{shopRewardId}/transactions","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopRewardId","in":"path","required":true,"example":"1234567890","schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_0"},{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"responseCodes":["201","400","401","404","409","422"],"pointer":"/rewards/{shopRewardId}/transactions","href":"rewards/createrewardtransaction","openApiOperationId":"createRewardTransaction","summary":"Add or reverse an entry"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"schemaId":"components/schemas/RewardTransactionInput","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/RewardTransactionInput"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionWithReward"}},"schemaId":"components/schemas/RewardTransactionWithReward"},{"code":"400","description":"Request body could not be parsed as JSON.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}},"schemaId":"components/schemas/ParseError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"No reward with that identifier. Re-read the customer to pick up their current "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_reward_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"code":"409","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" has already been recorded. The entry was applied once; stop retrying. Matches how a duplicate order or shipment create responds."},"children":[]}]}]}]},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The entry was rejected and must not be retried unchanged. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"errors"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" carries one of the stable codes "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"insufficient_balance"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (a reversal would drive the balance below zero), "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"currency_mismatch"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (the amount's currency differs from the reward's), "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"issues_at_not_future"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards_not_supported_for_platform"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (the shop is not on a platform that can hold rewards — this will never succeed). A malformed body returns descriptive messages instead, including for a zero amount, an amount beyond the supported range, an unknown currency, a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" longer than 255 characters, and a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"source_details"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object that is oversized, over-keyed, or not a flat object of strings."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/RewardTransactionWithReward","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionWithReward"}}},{"code":"400","schemaId":"components/schemas/ParseError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ParseError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"},{"code":"409"},{"code":"422","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/rewards/createrewardtransaction"}],"panels":[]}]},"httpPath":"/rewards/{shopRewardId}/transactions"},{"label":"Read entry history","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/rewards/listrewardtransactions","routeSlug":"/apis/onward/rewards/listrewardtransactions","metadata":{"seo":{"title":"Read entry history","description":"Entries come back newest first against an exclusive cursor. Page size is fixed at 50 and cursor is the only accepted parameter. next_cursor carries a value only when the page is full; otherwise it is null, which is how you know you have reached the end. This means a full-but-final page returns a non-null cursor whose follow-up page is empty. A non-positive cursor returns 400."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listRewardTransactions","name":"Read entry history","isWebhook":false,"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Read entry history","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Entries come back newest first against an exclusive cursor. Page size is fixed at 50 and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the only accepted parameter. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"next_cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" carries a value "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"only when the page is full"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"; otherwise it is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", which is how you know you have reached the end. This means a full-but-final page returns a non-null cursor whose follow-up page is empty. A non-positive cursor returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"400"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Entries Onward issues itself carry no caller ID, so they appear here with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"shop_transaction_id\": null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and are not individually addressable."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopRewardId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The ID of the parent discount that the reward is tied to — not the discount code, and not one of Onward's internal IDs. Read it from the customer's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array. Onward rewrites this value if it has to recreate a discount that was deleted, so treat a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"404"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" here as a signal to re-read "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /customers/{shopCustomerId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and pick up the current value."},"children":[]}]}]}],"required":true,"example":"1234567890"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"cursor","in":"query","schemaId":"schema_4","description":"Return entries with an ID below this value. Omit for the first page."}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/rewards/{shopRewardId}/transactions","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopRewardId","in":"path","required":true,"example":"1234567890","schemaId":"schema_0"}],"query":[{"name":"cursor","in":"query","required":false,"schemaId":"schema_4"}],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","400","401","404"],"pointer":"/rewards/{shopRewardId}/transactions","href":"rewards/listrewardtransactions","openApiOperationId":"listRewardTransactions","summary":"Read entry history"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionList"}},"schemaId":"components/schemas/RewardTransactionList"},{"code":"400","description":"Invalid cursor.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}},"schemaId":"components/schemas/ValidationError"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"No reward with that identifier. Re-read the customer to pick up their current "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_reward_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/RewardTransactionList","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionList"}}},{"code":"400","schemaId":"components/schemas/ValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ValidationError"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/rewards/listrewardtransactions"}],"panels":[]}]},"httpPath":"/rewards/{shopRewardId}/transactions"},{"label":"Read a single entry","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/rewards/getrewardtransaction","routeSlug":"/apis/onward/rewards/getrewardtransaction","metadata":{"seo":{"title":"Read a single entry","description":"Returns one entry in the full representation, identical to the create response. Only entries you sent are addressable here — entries Onward issued itself have no shop_transaction_id."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getRewardTransaction","name":"Read a single entry","isWebhook":false,"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions~1{shopTransactionId}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Read a single entry","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns one entry in the full representation, identical to the create response. Only entries you sent are addressable here — entries Onward issued itself have no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_transaction_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"shopRewardId","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The ID of the parent discount that the reward is tied to — not the discount code, and not one of Onward's internal IDs. Read it from the customer's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"rewards"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array. Onward rewrites this value if it has to recreate a discount that was deleted, so treat a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"404"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" here as a signal to re-read "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /customers/{shopCustomerId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and pick up the current value."},"children":[]}]}]}],"required":true,"example":"1234567890"},{"name":"shopTransactionId","in":"path","schemaId":"schema_0","description":"The entry's ID in your platform, as you sent it.","required":true}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions~1{shopTransactionId}/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions~1{shopTransactionId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/rewards/{shopRewardId}/transactions/{shopTransactionId}","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[{"name":"shopRewardId","in":"path","required":true,"example":"1234567890","schemaId":"schema_0"},{"name":"shopTransactionId","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","401","404"],"pointer":"/rewards/{shopRewardId}/transactions/{shopTransactionId}","href":"rewards/getrewardtransaction","openApiOperationId":"getRewardTransaction","summary":"Read a single entry"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionWithReward"}},"schemaId":"components/schemas/RewardTransactionWithReward"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"},{"code":"404","description":"No such reward or entry."}],"pointer":"/paths/~1rewards~1{shopRewardId}~1transactions~1{shopTransactionId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/RewardTransactionWithReward","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RewardTransactionWithReward"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/rewards/getrewardtransaction"}],"panels":[]}]},"httpPath":"/rewards/{shopRewardId}/transactions/{shopTransactionId}"}],"content":{"contentType":"group","meta":{"name":"Rewards"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Rewards","showPageActions":true},{"nodeType":"markdoc","content":"A customer's rewards balance and the ledger of entries behind it. Onward owns the balance and your shop the way customer redeems it; you add credit, reverse it, and read it back. Redemption is never posted through this API."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/customers/{shopCustomerId}/rewards","summary":"Create a customer's reward, with its opening entry","prefix":{"name":"post","color":"post"},"badges":[],"link":"/rewards/createcustomerreward","deprecated":false},{"title":"/rewards/{shopRewardId}/transactions","summary":"Add or reverse an entry","prefix":{"name":"post","color":"post"},"badges":[],"link":"/rewards/createrewardtransaction","deprecated":false},{"title":"/rewards/{shopRewardId}/transactions","summary":"Read entry history","prefix":{"name":"get","color":"get"},"badges":[],"link":"/rewards/listrewardtransactions","deprecated":false},{"title":"/rewards/{shopRewardId}/transactions/{shopTransactionId}","summary":"Read a single entry","prefix":{"name":"get","color":"get"},"badges":[],"link":"/rewards/getrewardtransaction","deprecated":false}]}]}]}]}},{"type":"group","label":"Shop","link":"/apis/onward/shop","routeSlug":"/apis/onward/shop","items":[{"label":"Read the shop for your API key","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/shop/getshop","routeSlug":"/apis/onward/shop/getshop","metadata":{"seo":{"title":"Read the shop for your API key","description":"Returns the shop your API key belongs to. Use it to confirm a key is valid and belongs to the shop you expect before you store it. A 401 means the key is not valid."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getShop","name":"Read the shop for your API key","isWebhook":false,"pointer":"/paths/~1shop/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Read the shop for your API key","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Returns the shop your API key belongs to. Use it to confirm a key is valid and belongs to the shop you expect before you store it. A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"401"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" means the key is not valid."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"api_key","scopes":[],"type":"apiKey","in":"header","paramName":"X-API-Key"}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_0","description":"Accept must be application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1shop/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/shop","servers":[{"url":"https://app.useonward.com/api/v1"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"api_key","type":"apiKey","name":"X-API-Key","in":"header"}],"scopes":[]}],"responseCodes":["200","401"],"pointer":"/shop","href":"shop/getshop","openApiOperationId":"getShop","summary":"Read the shop for your API key"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com/api/v1"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shop"}},"schemaId":"components/schemas/Shop"},{"code":"401","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API key missing or invalid. Provide a valid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"X-Api-Key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}},"schemaId":"components/schemas/UnauthorizedError"}],"pointer":"/paths/~1shop/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Shop","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Shop"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/shop/getshop"}],"panels":[]}]},"httpPath":"/shop"}],"content":{"contentType":"group","meta":{"name":"Shop"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Shop","showPageActions":true},{"nodeType":"markdoc","content":"The shop your API key belongs to."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/shop","summary":"Read the shop for your API key","prefix":{"name":"get","color":"get"},"badges":[],"link":"/shop/getshop","deprecated":false}]}]}]}]}},{"type":"group","label":"Tracking","link":"/apis/onward/tracking","routeSlug":"/apis/onward/tracking","items":[{"label":"Get order details","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/tracking/getorder","routeSlug":"/apis/onward/tracking/getorder","metadata":{"seo":{"title":"Get order details","description":"Retrieves order details including packages, line items, and tracking information."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getOrder","name":"Get order details","isWebhook":false,"pointer":"/paths/~1api~1order/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get order details","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieves order details including packages, line items, and tracking information."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Orders can be looked up using one of three methods:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By order key"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By order number and email address (both required together)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"By tracking number"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When more than one lookup parameter is supplied, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"key"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" takes precedence over "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"/"},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"email"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", which takes precedence over "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tracking_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The response includes a package-aware "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"packages[]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array — one entry per physical package, each with its carrier tracking links, a raw "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"current_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", a customer-friendly "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"current_status_label"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", delivery estimates, a tracking timeline, and its line items. Three order-level signals are also included: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"has_shippable_items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"unfulfilled_line_items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"has_fulfillment_without_tracking"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If a package's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"enrichment_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the response may have an empty "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array while Onward is still fetching the latest carrier tracking data. Poll "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order/enrichment_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (which does not re-trigger enrichment) and refetch this endpoint once it reports "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled: true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or render whatever data is already present. A package can still be "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at that point — render the data you have; if more tracking data arrives later, a subsequent request picks it up. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is reported within ~15 seconds."},"children":[]}]}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"shopify_domain","in":"query","schemaId":"schema_0","description":"The Shopify domain of the shop (e.g., \"example.myshopify.com\")","required":true,"example":"example.myshopify.com"},{"name":"key","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique order key. Alternative to order_number/email or tracking_number lookup."},"children":[]}]}]}],"example":"abc123def456"},{"name":"order_number","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order number or name (e.g., \"#1001\" or \"1001\"). Required when using email lookup."},"children":[]}]}]}],"example":"1001"},{"name":"email","in":"query","schemaId":"schema_5","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The customer's email address. Required when using order_number lookup."},"children":[]}]}]}],"example":"customer@example.com"},{"name":"tracking_number","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The shipment tracking number. Alternative to order_number/email lookup."},"children":[]}]}]}],"example":"1Z999AA10123456784"},{"name":"items_filter","in":"query","style":"deepObject","explode":true,"schemaId":"schema_6","description":"Optional filters applied to the returned line items and shipment items.","example":{"requires_shipping":"true"}}],"pointer":"/paths/~1api~1order/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_7","description":"Must be set to application/json","required":true,"example":"application/json"},{"name":"Content-Type","in":"header","schemaId":"schema_7","description":"Must be set to application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1api~1order/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/order","servers":[{"url":"https://app.useonward.com"}],"parameters":{"path":[],"query":[{"name":"shopify_domain","in":"query","required":true,"example":"example.myshopify.com","schemaId":"schema_0"},{"name":"key","in":"query","required":false,"example":"abc123def456","schemaId":"schema_0"},{"name":"order_number","in":"query","required":false,"example":"1001","schemaId":"schema_0"},{"name":"email","in":"query","required":false,"example":"customer@example.com","schemaId":"schema_5"},{"name":"tracking_number","in":"query","required":false,"example":"1Z999AA10123456784","schemaId":"schema_0"},{"name":"items_filter","in":"query","required":false,"example":{"requires_shipping":"true"},"schemaId":"schema_6","style":"deepObject","explode":true}],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_7"},{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_7"}],"cookie":[]},"security":[],"responseCodes":["200","404"],"pointer":"/api/order","href":"tracking/getorder","openApiOperationId":"getOrder","summary":"Get order details"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Order found successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_8","exampleIds":["paths/~1api~1order/get/responses/200/content/application~1json/example"]}},"schemaId":"schema_8","exampleIds":["paths/~1api~1order/get/responses/200/content/application~1json/example"]},{"code":"404","description":"Order not found or invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1api~1order/get/responses/404/content/application~1json/example"]}},"schemaId":"schema_9","exampleIds":["paths/~1api~1order/get/responses/404/content/application~1json/example"]}],"pointer":"/paths/~1api~1order/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_8","exampleIds":["paths/~1api~1order/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_8","exampleIds":["paths/~1api~1order/get/responses/200/content/application~1json/example"]}}},{"code":"404","schemaId":"schema_9","exampleIds":["paths/~1api~1order/get/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1api~1order/get/responses/404/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/tracking/getorder"}],"panels":[]}]},"httpPath":"/api/order"},{"label":"Poll package enrichment status","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/onward/tracking/getorderenrichmentstatus","routeSlug":"/apis/onward/tracking/getorderenrichmentstatus","metadata":{"seo":{"title":"Poll package enrichment status","description":"Lightweight poll target for clients waiting on Onward to finish fetching carrier tracking data. Returns the enrichment_status of each package on the order plus an all_settled flag, without the full order payload."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getOrderEnrichmentStatus","name":"Poll package enrichment status","isWebhook":false,"pointer":"/paths/~1api~1order~1enrichment_status/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Poll package enrichment status","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Lightweight poll target for clients waiting on Onward to finish fetching carrier tracking data. Returns the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"enrichment_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of each package on the order plus an "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" flag, without the full order payload."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unlike "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", this endpoint is read-only — it never triggers enrichment. While a package reports "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"enrichment_status: \"pending\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", poll this endpoint, then refetch "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" once "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". A package can still be "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" at that point — render the data you have rather than continuing to poll. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is reported within ~15 seconds."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Orders are looked up with the same parameters as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"shopify_domain","in":"query","schemaId":"schema_0","description":"The Shopify domain of the shop (e.g., \"example.myshopify.com\")","required":true,"example":"example.myshopify.com"},{"name":"key","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique order key. Alternative to order_number/email or tracking_number lookup."},"children":[]}]}]}],"example":"abc123def456"},{"name":"order_number","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order number or name (e.g., \"#1001\" or \"1001\"). Required when using email lookup."},"children":[]}]}]}],"example":"1001"},{"name":"email","in":"query","schemaId":"schema_5","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The customer's email address. Required when using order_number lookup."},"children":[]}]}]}],"example":"customer@example.com"},{"name":"tracking_number","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The shipment tracking number. Alternative to order_number/email lookup."},"children":[]}]}]}],"example":"1Z999AA10123456784"}],"pointer":"/paths/~1api~1order~1enrichment_status/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Accept","in":"header","schemaId":"schema_7","description":"Must be set to application/json","required":true,"example":"application/json"},{"name":"Content-Type","in":"header","schemaId":"schema_7","description":"Must be set to application/json","required":true,"example":"application/json"}],"pointer":"/paths/~1api~1order~1enrichment_status/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/order/enrichment_status","servers":[{"url":"https://app.useonward.com"}],"parameters":{"path":[],"query":[{"name":"shopify_domain","in":"query","required":true,"example":"example.myshopify.com","schemaId":"schema_0"},{"name":"key","in":"query","required":false,"example":"abc123def456","schemaId":"schema_0"},{"name":"order_number","in":"query","required":false,"example":"1001","schemaId":"schema_0"},{"name":"email","in":"query","required":false,"example":"customer@example.com","schemaId":"schema_5"},{"name":"tracking_number","in":"query","required":false,"example":"1Z999AA10123456784","schemaId":"schema_0"}],"querystring":[],"header":[{"name":"Accept","in":"header","required":true,"example":"application/json","schemaId":"schema_7"},{"name":"Content-Type","in":"header","required":true,"example":"application/json","schemaId":"schema_7"}],"cookie":[]},"security":[],"responseCodes":["200","404"],"pointer":"/api/order/enrichment_status","href":"tracking/getorderenrichmentstatus","openApiOperationId":"getOrderEnrichmentStatus","summary":"Poll package enrichment status"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://app.useonward.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Order found successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example"]}},"schemaId":"schema_10","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example"]},{"code":"404","description":"Order not found or invalid parameters","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example"]}},"schemaId":"schema_9","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example"]}],"pointer":"/paths/~1api~1order~1enrichment_status/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_10","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example"]}}},{"code":"404","schemaId":"schema_9","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/tracking/getorderenrichmentstatus"}],"panels":[]}]},"httpPath":"/api/order/enrichment_status"}],"content":{"contentType":"group","meta":{"name":"Tracking"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Tracking","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order lookup for customer-facing tracking pages, the data behind Onward's storefront tracking widget. These endpoints take no API key. They look up an order by the shop's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shopify_domain"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" plus its order key, order number and email, or tracking number, and are served from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://app.useonward.com/api"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" rather than "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/api/v1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/order","summary":"Get order details","prefix":{"name":"get","color":"get"},"badges":[],"link":"/tracking/getorder","deprecated":false},{"title":"/api/order/enrichment_status","summary":"Poll package enrichment status","prefix":{"name":"get","color":"get"},"badges":[],"link":"/tracking/getorderenrichmentstatus","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/UnauthorizedError":{"id":"components/schemas/UnauthorizedError","kind":"json-schema","title":"UnauthorizedError","data":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A short, human-readable description of the authentication failure.","example":"Unauthorized"}}}},"components/schemas/ParseError":{"id":"components/schemas/ParseError","kind":"json-schema","title":"ParseError","data":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","description":"A list of parser errors describing why the request body could not be parsed.","items":{"type":"string","example":"Error occurred while parsing request parameters"},"minItems":1}}}},"components/schemas/ValidationError":{"id":"components/schemas/ValidationError","kind":"json-schema","title":"ValidationError","data":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","description":"Array of errors. Each error contains the field in the beginning followed by the issue found.","items":{"description":"Error messages","type":"string","example":"Name is required"},"minItems":1}}}},"components/schemas/OrderList":{"id":"components/schemas/OrderList","kind":"json-schema","title":"OrderList","data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderSummary"}},"next_cursor":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Cursor to pass as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the next request to fetch the following page. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when there are no more orders to page through."},"children":[]}]}]}],"example":8842}}}},"components/schemas/OrderSummary":{"id":"components/schemas/OrderSummary","kind":"json-schema","title":"OrderSummary","data":{"type":"object","description":"A condensed order representation returned by the list endpoint.","properties":{"shop_order_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Order (the same shop_order_id you sent when creating it)."},"children":[]}]}]}],"example":"18282"},"shop_order_number":{"type":"string","description":"The Order Number as presented to the customer.","example":"W-94713"},"lookup_key":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Onward's identifier for this Order. Use it to deep-link a customer into the start-a-claim flow at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://app.useonward.com/inquiries/start?uuid={lookup_key}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"fa524f69d568a1b2c3d4e5f6"},"customer":{"$ref":"#/components/schemas/Customer"},"total_price":{"description":"Order total in shop's currency.","allOf":[{"$ref":"#/components/schemas/Money"}]},"protection_paid":{"description":"Protection paid for this order by the customer.","allOf":[{"$ref":"#/components/schemas/Money"}]},"amount_protected":{"description":"Sum of shippable line items that are being protected in shop's currency.","allOf":[{"$ref":"#/components/schemas/Money"}]},"protected":{"type":"boolean","description":"Whether this order was upgraded with Onward protection.","example":true},"financial_status":{"$ref":"#/components/schemas/FinancialStatus"},"created_at":{"type":"string","format":"date-time","description":"When the order was placed in your e-comm platform.","example":"2024-11-26T17:32:28Z"}}}},"components/schemas/FinancialStatus":{"id":"components/schemas/FinancialStatus","kind":"json-schema","title":"FinancialStatus","data":{"type":"string","description":"The order's financial status. Orders synced from your platform may carry statuses beyond the four accepted when creating or updating an order.","example":"paid","enum":["pending","authorized","partially_paid","paid","partially_refunded","refunded","voided"]}},"components/schemas/Order":{"id":"components/schemas/Order","kind":"json-schema","title":"Order","data":{"type":"object","properties":{"shop_order_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Order. Must be unique across your orders and stable over time — Onward uses it to look up and de-duplicate orders, so the same value must always refer to the same order."},"children":[]}]}]}],"example":"18282"},"shop_order_number":{"type":"string","description":"The Order Number as presented to the customer","example":"W-94713"},"lookup_key":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Onward's identifier for this Order. Use it to deep-link a customer into the start-a-claim flow at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://app.useonward.com/inquiries/start?uuid={lookup_key}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"fa524f69d568a1b2c3d4e5f6"},"subtotal_price":{"description":"Order subtotal in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"subtotal_price_presentment":{"description":"Order subtotal in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_discounts_price":{"description":"Sum of applied discounts in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_discounts_price_presentment":{"description":"Sum of applied discounts in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_shipping_price":{"description":"Shipping amount in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_shipping_price_presentment":{"description":"Shipping amount in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_tax_price":{"description":"Total tax in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_tax_price_presentment":{"description":"Total tax in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price":{"description":"Order total in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price_presentment":{"description":"Order total in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"protection_paid":{"description":"Protection paid for this order by the customer","allOf":[{"$ref":"#/components/schemas/Money"}]},"amount_protected":{"description":"Sum of shippable line items that are being protected in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"amount_protected_presentment":{"description":"Sum of shippable line items that are being protected in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"created_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When the order was placed in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (as in the example); timezone offsets such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are also accepted."},"children":[]}]}]}],"example":"2024-11-26T17:32:28Z"},"financial_status":{"$ref":"#/components/schemas/FinancialStatus"},"source_name":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Where the order was sold, as sent on creation. Reads "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"API"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for orders created without one."},"children":[]}]}]}],"example":"phone"},"customer":{"$ref":"#/components/schemas/CustomerWithRewards"},"shipping_address":{"$ref":"#/components/schemas/Address"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}},"required":["shop_order_id","shop_order_number","subtotal_price","total_discounts_price","total_shipping_price","total_tax_price","total_price","created_at","financial_status","customer","shipping_address","line_items"]}},"components/schemas/CreateOrderInput":{"id":"components/schemas/CreateOrderInput","kind":"json-schema","title":"CreateOrderInput","data":{"type":"object","properties":{"shop_order_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Order. Must be unique across your orders and stable over time — Onward uses it to look up and de-duplicate orders, so the same value must always refer to the same order."},"children":[]}]}]}],"example":"18282"},"shop_order_number":{"type":"string","description":"The Order Number as presented to the customer","example":"W-94713"},"subtotal_price":{"description":"Order subtotal in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"subtotal_price_presentment":{"description":"Order subtotal in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_discounts_price":{"description":"Sum of applied discounts in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_discounts_price_presentment":{"description":"Sum of applied discounts in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_shipping_price":{"description":"Shipping amount in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_shipping_price_presentment":{"description":"Shipping amount in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_tax_price":{"description":"Total tax in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_tax_price_presentment":{"description":"Total tax in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price":{"description":"Order total in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price_presentment":{"description":"Order total in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"amount_protected":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sum of shippable line items that are being protected in shop's currency. Required; send an amount_protected of 0 cents for an unprotected order."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/Money"}]},"amount_protected_presentment":{"description":"Sum of shippable line items that are being protected in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"purchased_quote_token":{"type":"string","description":"The quote being purchased, as received from Onward's Quote API","example":"c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUiZ4o--nnYz0Lj5WsxSqsUxtBpIIQ=="},"created_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When the order was placed in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (as in the example); timezone offsets such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are also accepted."},"children":[]}]}]}],"example":"2024-11-26T17:32:28Z"},"financial_status":{"type":"string","example":"paid","enum":["pending","paid","refunded","voided"]},"source_name":{"type":"string","maxLength":100,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Where you sold this order — "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"phone"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"retail"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"amazon"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Free text, trimmed of surrounding whitespace and matched case-insensitively by cashback exceptions. Defaults to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"API"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when omitted, and can't be changed after creation."},"children":[]}]}]}],"example":"phone"},"customer":{"$ref":"#/components/schemas/Customer"},"shipping_address":{"$ref":"#/components/schemas/Address"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}},"required":["shop_order_id","shop_order_number","subtotal_price","total_discounts_price","total_shipping_price","total_tax_price","total_price","amount_protected","created_at","financial_status","customer","shipping_address","line_items"]}},"components/schemas/UpdateOrderInput":{"id":"components/schemas/UpdateOrderInput","kind":"json-schema","title":"UpdateOrderInput","data":{"type":"object","properties":{"shop_order_number":{"type":"string","description":"The Order Number as presented to the customer","example":"W-94713"},"subtotal_price":{"description":"Order subtotal in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_discounts_price":{"description":"Sum of applied discounts in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_shipping_price":{"description":"Shipping amount in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_tax_price":{"description":"Total tax in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price":{"description":"Order total in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"financial_status":{"type":"string","example":"paid","enum":["pending","paid","refunded","voided"]},"customer":{"$ref":"#/components/schemas/Customer"},"shipping_address":{"$ref":"#/components/schemas/Address"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}},"required":["shop_order_number","subtotal_price","total_discounts_price","total_shipping_price","total_tax_price","total_price","financial_status","customer","shipping_address","line_items"]}},"components/schemas/Customer":{"id":"components/schemas/Customer","kind":"json-schema","title":"Customer","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"At least one of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"first_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"last_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"email"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"phone_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is required."},"children":[]}]}]}],"properties":{"shop_customer_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Customer. For a Shopify shop, the numeric Shopify customer ID ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"6072418623"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), not the GID. Must be unique across your customers and stable over time — Onward uses it to look up and de-duplicate customers, so the same value must always refer to the same customer."},"children":[]}]}]}],"maxLength":255,"example":"6072418623"},"first_name":{"type":"string","nullable":true,"maxLength":255,"example":"Sally"},"last_name":{"type":"string","nullable":true,"maxLength":255,"example":"Loo"},"email":{"type":"string","format":"email","nullable":true,"maxLength":255,"example":"sally@example.com"},"phone_number":{"type":"string","format":"phone","nullable":true,"maxLength":255,"example":"+13105551234"}},"required":["shop_customer_id"]}},"components/schemas/Address":{"id":"components/schemas/Address","kind":"json-schema","title":"Address","data":{"type":"object","properties":{"address1":{"type":"string","example":"123 Main St"},"address2":{"type":"string","example":"Unit 50"},"province_code":{"type":"string","example":"CA","description":"Subdivision code (ISO-3166)"},"city":{"type":"string","example":"Los Angeles"},"postal_code":{"type":"string","example":"90210"},"country_code":{"type":"string","example":"US","description":"Alpha-2 country code (ISO-3166)"},"phone_number":{"type":"string","format":"phone","example":"+13105551234"}},"required":["address1","province_code","city","postal_code","country_code","phone_number"]}},"components/schemas/LineItem":{"id":"components/schemas/LineItem","kind":"json-schema","title":"LineItem","data":{"type":"object","properties":{"shop_line_item_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your identifier for the Line Item. Must be unique within its Order and stable over time — Onward uses it to look up and de-duplicate line items within an order, so the same value must always refer to the same line item."},"children":[]}]}]}],"example":"816721"},"shop_product_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your identifier for the product. This is a reference to the product, not a unique per-line-item value — the same product ID will recur across every line item (and order) for that product."},"children":[]}]}]}],"example":"142"},"shop_variant_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your identifier or SKU for the variant. This is a reference to the variant, not a unique per-line-item value — the same variant ID will recur across every line item (and order) for that variant."},"children":[]}]}]}],"example":"7261"},"name":{"type":"string","description":"Name for the product and variant purchased","example":"Cool T-shirt - Red"},"unit_price":{"description":"Item price in order's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price":{"description":"Line item total in order's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price_presentment":{"description":"Line item total in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"quantity":{"type":"integer","format":"int32","example":2},"image_url":{"type":"string","format":"url","description":"URL to an image of the item","example":"https://placecats.com/neo/300/200.png"},"grams":{"type":"integer","format":"int32","description":"Weight of the item in grams","example":24},"is_protected":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Whether the item is covered by Onward protection. Required on every line item; send false for line items that are not being protected, including the protection fee line itself. Requires purchase token and amount protected in the Order. Use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"requires_shipping"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to say whether the item ships."},"children":[]}]}]}],"example":true},"requires_shipping":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Whether the item is physically shipped. Items that don't ship can't be claimed and aren't shown in packages on the Customer Hub. When omitted, defaults to the value of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"is_protected"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", so send it on every order create and update that includes the item; an update that omits it resets the item to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"is_protected"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":true},"refunded_quantity":{"type":"integer","format":"int32","description":"Number of items refunded (for full or partial refunds)","example":1},"refunded_price":{"description":"Total refunded amount in order's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"refunded_price_presentment":{"description":"Total refunded amount in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]}},"required":["shop_line_item_id","shop_product_id","shop_variant_id","name","unit_price","total_price","quantity","is_protected","grams","refunded_quantity","refunded_price"]}},"components/schemas/Shipment":{"id":"components/schemas/Shipment","kind":"json-schema","title":"Shipment","data":{"type":"object","properties":{"shop_shipment_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Shipment. Must be unique across your shipments and stable over time — Onward uses it to look up and de-duplicate shipments, so the same value must always refer to the same shipment."},"children":[]}]}]}],"example":"3712"},"shop_order_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your ID for the Order this Shipment relates to. Must match the shop_order_id of an existing Order."},"children":[]}]}]}],"example":"18282"},"tracking_number":{"type":"string","description":"Courier tracking number","example":"780371515850"},"tracking_url":{"type":"string","description":"URL to courier tracking page","example":"https://www.fedex.com/wtrk/track/?trknbr=780371515850"},"tracking_company":{"type":"string","description":"Courier name","example":"DHL Express"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The order line items included in this shipment"},"created_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When the shipment was created in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (as in the example); timezone offsets such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are also accepted."},"children":[]}]}]}],"example":"2024-11-26T17:32:28Z"}},"required":["shop_shipment_id","tracking_number","shop_order_id","tracking_company","line_items","created_at"]}},"components/schemas/ShipmentEvent":{"id":"components/schemas/ShipmentEvent","kind":"json-schema","title":"ShipmentEvent","data":{"type":"object","properties":{"shop_shipment_event_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your identifier for the Shipment Event. Must be unique within its Shipment and stable over time — Onward uses it to look up and de-duplicate events within a shipment, so the same value must always refer to the same event."},"children":[]}]}]}],"example":"817391"},"status":{"type":"string","example":"in_transit","enum":["label_printed","label_purchased","attempted_delivery","ready_for_pickup","ready_for_recipient_pickup","carrier_picked_up","confirmed","in_transit","out_for_delivery","delivered","delayed","failure","picked_up","returning_to_sender","buyer_action_required","canceled"]},"message":{"type":"string"},"estimated_delivery_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Carrier's estimated delivery date/time. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (as in the example); timezone offsets such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are also accepted."},"children":[]}]}]}],"example":"2024-11-26T17:32:28Z"},"created_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When the event occurred in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (as in the example); timezone offsets such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"-08:00"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are also accepted."},"children":[]}]}]}],"example":"2024-11-26T17:32:28Z"}},"required":["shop_shipment_event_id","status","created_at"]}},"components/schemas/Cart":{"id":"components/schemas/Cart","kind":"json-schema","title":"Cart","data":{"type":"object","properties":{"amount_protected":{"description":"Sum of shippable line items that are being protected","allOf":[{"$ref":"#/components/schemas/Money"}]}},"required":["amount_protected"]}},"components/schemas/Money":{"id":"components/schemas/Money","kind":"json-schema","title":"Money","data":{"type":"object","properties":{"cents":{"type":"integer","format":"int32","example":1299},"currency":{"type":"string","format":"currency","description":"Currency code (ISO 4217)","example":"USD"}},"required":["cents","currency"]}},"components/schemas/Quote":{"id":"components/schemas/Quote","kind":"json-schema","title":"Quote","data":{"type":"object","properties":{"id":{"type":"string","description":"Onward's ID for this Quote","example":"8c0d0946dc595ecfe090ef85"},"token":{"type":"string","description":"Tokenized reference to this Quote that you will use when creating the protected Order after checkout","example":"c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUiZ4o--nnYz0Lj5WsxSqsUxtBpIIQ=="},"price":{"description":"Price of protection to be charged to the customer","allOf":[{"$ref":"#/components/schemas/Money"}]},"variant":{"type":"object","description":"(Only included for Shopify shops) The Shopify Variant to add to cart in order to purchase this Quote","properties":{"id":{"type":"integer","format":"int32","description":"Shopify ID for the Variant"},"sku":{"type":"string","description":"Shopify SKU for the Variant"}}}}}},"components/schemas/CustomerWithRewards":{"id":"components/schemas/CustomerWithRewards","kind":"json-schema","title":"CustomerWithRewards","data":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"type":"object","properties":{"rewards":{"type":"array","description":"Every reward this customer holds. Empty when they hold none.","items":{"$ref":"#/components/schemas/Reward"}}},"required":["rewards"]}]}},"components/schemas/Reward":{"id":"components/schemas/Reward","kind":"json-schema","title":"Reward","data":{"type":"object","properties":{"shop_reward_id":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The ID of the discount this reward is tied to. Store it — later calls address the reward by it. "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Can be "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the discount has not been created yet or has gone missing: the balance is written before the discount is synced, so a platform outage leaves the reward addressable only once the sync retries. Re-read "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /customers/{shopCustomerId}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to pick it up. Also "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when your shop has no redemption mechanism, since there is nothing to address the reward by."},"children":[]}]}]}],"example":"1234567890"},"balance":{"description":"Spendable balance.","allOf":[{"$ref":"#/components/schemas/Money"}]},"pending_issuance_balance":{"description":"Credit that is scheduled but not yet spendable, reported separately from the spendable balance.","allOf":[{"$ref":"#/components/schemas/Money"}]},"lifetime_issued":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Credit issued, "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"net of reversals"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — not a gross \"total ever earned\". A reversal is stored as a negative entry in the same bucket, so it reduces this figure, and the identity "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"lifetime_issued = balance + lifetime_used"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" always holds. Do not render it as lifetime earnings."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/Money"}]},"lifetime_used":{"description":"Credit redeemed against the discount code.","allOf":[{"$ref":"#/components/schemas/Money"}]},"lifetime_refunded":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Always zero. Onward does not currently write this bucket — refunds are modelled as reversal ledger entries, not as a lifetime total. Do not build on this field."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/Money"}]},"redemption_details":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"How the customer can spend this balance, for example with a discount code. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when there is nothing to redeem: the balance is zero, or the shop has no way to redeem it. More types may be added later, so ignore any "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" you don't recognize."},"children":[]}]}]}],"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/RedemptionDetails"}]},"balance_updated_at":{"type":"string","format":"date-time"}},"required":["shop_reward_id","balance","pending_issuance_balance","redemption_details"]}},"components/schemas/RedemptionDetails":{"id":"components/schemas/RedemptionDetails","kind":"json-schema","title":"RedemptionDetails","data":{"type":"object","properties":{"name":{"type":"string","description":"The system that owns the redemption mechanism.","example":"shop"},"type":{"type":"string","description":"The mechanism, which you render against.","example":"discount_code"},"code":{"type":"string","example":"ONWARD-e77c3802fd6f9d7d6daae8e286a80f11"},"url":{"type":"string","format":"uri","example":"https://shop.example.com/discount/ONWARD-e77c3802fd6f9d7d6daae8e286a80f11?ref=onward"}},"required":["name","type"]}},"components/schemas/RewardTransactionInput":{"id":"components/schemas/RewardTransactionInput","kind":"json-schema","title":"RewardTransactionInput","data":{"type":"object","properties":{"shop_transaction_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The entry's ID in your platform. Unique and stable: it addresses the entry and de-duplicates writes, the same way "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_order_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" does for orders. It is what makes a forwarder safe to retry. Avoid "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"."},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — the value travels in a URL path segment."},"children":[]}]}]}],"example":"inveterate:1a2b3c"},"amount":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Positive to credit; negative to reverse credit previously issued. Currency must match the reward's currency. Onward derives the presentment and USD amounts itself — do not send them."},"children":[]}]}]}],"allOf":[{"$ref":"#/components/schemas/Money"}]},"issues_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A future timestamp holds the entry as pending issuance until then, after which it becomes spendable. Omit for immediately spendable credit — a past or present value is rejected rather than treated as immediate, so there is exactly one way to express \"spendable now\". The field is cleared once the entry issues, so a matured entry reports "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"source_details":{"$ref":"#/components/schemas/SourceDetails"}},"required":["shop_transaction_id","amount","source_details"]}},"components/schemas/SourceDetails":{"id":"components/schemas/SourceDetails","kind":"json-schema","title":"SourceDetails","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Where the entry came from. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is a stable lowercase slug assigned when your integration is onboarded, and it is the only key Onward reads — it attributes the entry to the platform that sent it, since the API key resolves to a shop rather than to a caller. Every other key belongs to you: Onward stores it verbatim, surfaces it for support, and never interprets it. Keep it a flat object of string values with a small number of keys. There is deliberately no Onward vocabulary for why credit was earned, so your own reason travels here."},"children":[]}]}]}],"properties":{"name":{"type":"string","example":"inveterate"}},"required":["name"],"additionalProperties":{"type":"string"},"example":{"name":"inveterate","reason":"SIGNUP_STORE_CREDIT"}}},"components/schemas/RewardTransaction":{"id":"components/schemas/RewardTransaction","kind":"json-schema","title":"RewardTransaction","data":{"type":"object","properties":{"shop_transaction_id":{"type":"string","nullable":true,"description":"Null for entries Onward issued itself, which are therefore not individually addressable.","example":"inveterate:1a2b3c"},"amount":{"allOf":[{"$ref":"#/components/schemas/Money"}]},"classification":{"type":"string","description":"Derived by Onward and returned for information only.","enum":["issued","pending_issuance","used"]},"issues_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"source_details":{"$ref":"#/components/schemas/SourceDetails"}},"required":["shop_transaction_id","amount","classification","created_at"]}},"components/schemas/RewardTransactionWithReward":{"id":"components/schemas/RewardTransactionWithReward","kind":"json-schema","title":"RewardTransactionWithReward","data":{"allOf":[{"$ref":"#/components/schemas/RewardTransaction"},{"type":"object","properties":{"reward":{"description":"The affected reward, with balances updated.","allOf":[{"$ref":"#/components/schemas/Reward"}]}},"required":["reward"]}]}},"components/schemas/RewardTransactionList":{"id":"components/schemas/RewardTransactionList","kind":"json-schema","title":"RewardTransactionList","data":{"type":"object","properties":{"transactions":{"type":"array","description":"Newest first. The nested reward is omitted here, since it would be identical on every row.","items":{"$ref":"#/components/schemas/RewardTransaction"}},"next_cursor":{"type":"integer","format":"int64","nullable":true,"description":"Non-null only when the page is full, so a full-but-final page returns a cursor whose next page is empty."}},"required":["transactions","next_cursor"]}},"components/schemas/ClaimList":{"id":"components/schemas/ClaimList","kind":"json-schema","title":"ClaimList","data":{"type":"object","properties":{"claims":{"type":"array","items":{"$ref":"#/components/schemas/ClaimSummary"}},"next_cursor":{"type":"integer","format":"int64","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Cursor to pass as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cursor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the next request to fetch the following page. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when there are no more claims to page through."},"children":[]}]}]}],"example":8842}}}},"components/schemas/ClaimSummary":{"id":"components/schemas/ClaimSummary","kind":"json-schema","title":"ClaimSummary","data":{"type":"object","description":"A condensed claim representation returned by the list endpoint.","properties":{"lookup_key":{"type":"string","description":"Onward's identifier for this Claim.","example":"clm_f4f55e6636"},"order":{"type":"object","description":"Identifiers for the order this claim was filed against.","properties":{"shop_order_id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Your unique identifier for the Order (the same shop_order_id you sent when creating it)."},"children":[]}]}]}],"example":"18282"},"shop_order_number":{"type":"string","description":"The Order Number as presented to the customer.","example":"W-94713"}}},"cause":{"$ref":"#/components/schemas/ClaimCause"},"status":{"$ref":"#/components/schemas/ClaimStatus"},"status_reason":{"$ref":"#/components/schemas/ClaimStatusReason"},"reported_amount":{"description":"Amount the customer reported as the value of the claim when filing it.","allOf":[{"$ref":"#/components/schemas/Money"}]},"resolved_amount":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Amount credited to the merchant when the claim was resolved. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" until the claim is resolved."},"children":[]}]}]}],"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"created_at":{"type":"string","format":"date-time","description":"When the claim was filed.","example":"2024-11-26T17:32:28Z"}}}},"components/schemas/ClaimCause":{"id":"components/schemas/ClaimCause","kind":"json-schema","title":"ClaimCause","data":{"type":"string","description":"The reason the claim was filed.","example":"damaged","enum":["stuck_in_transit","damaged","stolen","missing","wrong_item","not_satisfied","returned","chargeback","late_delivery","lost","defective_item","other"]}},"components/schemas/ClaimStatus":{"id":"components/schemas/ClaimStatus","kind":"json-schema","title":"ClaimStatus","data":{"type":"string","description":"The claim's current status.","example":"resolved","enum":["in_progress","on_hold","resolved","unqualified","denied"]}},"components/schemas/ClaimStatusReason":{"id":"components/schemas/ClaimStatusReason","kind":"json-schema","title":"ClaimStatusReason","data":{"type":"string","description":"The specific reason behind the claim's current status.","example":"refunded","enum":["in_review","filed_too_early","filed_too_late","customer_wanted_exchange","unfulfilled_order","duplicate_claim","merchant_policy","chargeback_not_covered","not_enough_info","shipment_found","wrong_address","cosmetic_damage","waiting_on_customer","waiting_on_merchant","waiting_on_onward","handled_by_merchant","reordered","refunded","store_credit_reward_provided","store_credit_gift_card_provided","reimbursed","auto_denied","fraud","product_defect","wrong_item_shipped"]}},"components/schemas/Shop":{"id":"components/schemas/Shop","kind":"json-schema","title":"Shop","data":{"type":"object","properties":{"shop_id":{"type":"integer","description":"Onward's identifier for the shop.","example":1234}},"required":["shop_id"]}},"components/schemas/TrackingEnrichmentStatus":{"id":"components/schemas/TrackingEnrichmentStatus","kind":"json-schema","title":"TrackingEnrichmentStatus","data":{"type":"string","nullable":true,"enum":["pending","subscribed","complete","failed"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Status of carrier-data enrichment for a package, while Onward"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"retrieves the latest tracking data for it. Poll"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/order/enrichment_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" until it reports "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled: true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":","},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"accepting partial data."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": enrichment does not apply to this package (e.g., the"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"carrier already supplies its own events)."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": no carrier data yet; "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" may be empty. This can"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"persist after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"all_settled"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" — treat it as partial data"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"rather than as a reason to keep polling."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"subscribed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": Onward registered the package with a carrier-data"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"provider ahead of time, and new events arrive as the carrier"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"reports them. Not a reason to poll; render the data you have."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"complete"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": enrichment finished; "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"events"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" reflects the latest carrier"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"data."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": terminal \"no enrichment available\" — tracking data could"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"not be retrieved for this package. Render whatever data is already"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"present."},"children":[]}]}]}]}]}},"components/schemas/TrackingOrder":{"id":"components/schemas/TrackingOrder","kind":"json-schema","title":"TrackingOrder","data":{"type":"object","properties":{"id":{"type":"integer","description":"Internal order ID"},"key":{"type":"string","description":"Unique order key"},"platform_order_id":{"type":"string","description":"Shopify order GID"},"shop_order_name":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order name/number as displayed in Shopify (e.g., \"#1001\")"},"children":[]}]}]}]},"financial_status":{"type":"string","description":"Payment status (humanized)","example":"Paid"},"fulfillment_status":{"type":"string","nullable":true,"description":"Fulfillment status (humanized)","example":"Fulfilled"},"created_at":{"type":"string","format":"date-time","description":"Order creation timestamp in ISO 8601 format"},"total_price":{"type":"string","description":"Formatted total price with currency","example":"$99.99 USD"},"protected":{"type":"boolean","description":"Whether the order is currently protected by Onward"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/TrackingLineItem"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/TrackingPackage"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Physical packages on the order — one entry per non-cancelled package."},"children":[]}]}]}]},"unfulfilled_line_items":{"type":"array","items":{"$ref":"#/components/schemas/TrackingShipmentItem"},"description":"Shippable line items on the order that have not yet been fulfilled."},"has_shippable_items":{"type":"boolean","description":"Whether the order has any physical (shippable) line items. False for digital-only orders."},"has_fulfillment_without_tracking":{"type":"boolean","description":"Whether any non-cancelled fulfillment on the order is still missing a tracking number."}}}},"components/schemas/TrackingShipmentItem":{"id":"components/schemas/TrackingShipmentItem","kind":"json-schema","title":"TrackingShipmentItem","data":{"type":"object","properties":{"id":{"type":"integer","description":"Internal line item ID"},"quantity":{"type":"integer","description":"Quantity of this item in the shipment"},"title":{"type":"string","description":"Product title with variant info"},"image_url":{"type":"string","format":"uri","nullable":true,"description":"Product image URL"}}}},"components/schemas/TrackingShipmentEvent":{"id":"components/schemas/TrackingShipmentEvent","kind":"json-schema","title":"TrackingShipmentEvent","data":{"type":"object","properties":{"id":{"type":"integer","description":"Event ID"},"status":{"type":"string","description":"Event status (humanized)"},"message":{"type":"string","nullable":true,"description":"Event description/message"},"happened_at":{"type":"string","description":"Formatted timestamp string"},"location":{"type":"string","nullable":true,"description":"Location where the event occurred"}}}},"components/schemas/TrackingLineItem":{"id":"components/schemas/TrackingLineItem","kind":"json-schema","title":"TrackingLineItem","data":{"type":"object","properties":{"id":{"type":"integer","description":"Internal line item ID"},"quantity":{"type":"integer","description":"Quantity ordered"},"title":{"type":"string","description":"Product title with variant info"},"fulfillment_status":{"type":"string","description":"Fulfillment status (humanized)"},"price":{"type":"string","description":"Formatted total price with currency"},"image_url":{"type":"string","format":"uri","nullable":true,"description":"Product image URL"}}}},"components/schemas/TrackingPackage":{"id":"components/schemas/TrackingPackage","kind":"json-schema","title":"TrackingPackage","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A physical package on the order — its carrier tracking, current status, delivery estimates, tracking timeline, and items."},"children":[]}]}]}],"properties":{"id":{"type":"integer","description":"Internal package ID"},"tracking_number":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Primary carrier tracking number (the first entry of tracking_links)"},"children":[]}]}]}]},"tracking_company":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Carrier name (e.g., \"UPS\", \"FedEx\", \"USPS\"). Null when the carrier is not known — never the literal string \"unknown\"."},"children":[]}]}]}]},"tracking_url":{"type":"string","format":"uri","nullable":true,"description":"Carrier tracking URL for the primary tracking number. Null when the URL points to a tracking aggregator (such as 17Track or AfterShip) rather than the carrier."},"tracking_links":{"type":"array","items":{"$ref":"#/components/schemas/TrackingLink"},"description":"Every tracking number/URL pair for the package. A single fulfillment can ship as multiple parcels, each with its own tracking number. A pair whose URL points to a tracking aggregator keeps its number with a null URL."},"current_status":{"type":"string","nullable":true,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Raw carrier status of the package's most-recently-active shipment (e.g., \"in_transit\", \"out_for_delivery\", \"delivered\", \"returning_to_sender\", \"canceled\"). \"canceled\" means the shipping label was canceled; a later carrier scan can still replace it. Null when no status is available yet."},"children":[]}]}]}]},"current_status_label":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Customer-friendly label for current_status (e.g., \"In transit\", \"Delivered\"). Always present — pre-pickup statuses and a missing status collapse to \"Awaiting first scan\"."},"children":[]}]}]}]},"estimated_delivery_at":{"type":"string","format":"date-time","nullable":true,"description":"Estimated delivery timestamp in ISO 8601 format"},"delivered_at":{"type":"string","format":"date-time","nullable":true,"description":"Delivery timestamp in ISO 8601 format"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TrackingShipmentEvent"},"description":"Tracking timeline events for the package (most recent first)"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/TrackingShipmentItem"},"description":"Line items included in the package"},"enrichment_status":{"$ref":"#/components/schemas/TrackingEnrichmentStatus"}}}},"components/schemas/TrackingLink":{"id":"components/schemas/TrackingLink","kind":"json-schema","title":"TrackingLink","data":{"type":"object","properties":{"tracking_number":{"type":"string","description":"Carrier tracking number"},"tracking_url":{"type":"string","format":"uri","nullable":true,"description":"Carrier tracking URL for this tracking number. Null when the carrier provides no URL, or when the URL points to a tracking aggregator (such as 17Track or AfterShip) rather than the carrier."}}}},"schema_0":{"kind":"json-schema","data":{"type":"string"},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"string","format":"date-time"},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"integer","format":"int64"},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"cart":{"$ref":"#/components/schemas/Cart"}},"required":["cart"]},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"integer","format":"int64","minimum":1},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"string","format":"email"},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"object","properties":{"requires_shipping":{"type":"string","enum":["true"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"true\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", only returns line items that require shipping (excludes digital products and other non-shippable items)."},"children":[]}]}]}]}}},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"string","enum":["application/json"]},"id":"schema_7"},"schema_8":{"kind":"json-schema","data":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/TrackingOrder"}}},"id":"schema_8"},"schema_9":{"kind":"json-schema","data":{"type":"object","properties":{}},"id":"schema_9"},"schema_10":{"kind":"json-schema","data":{"type":"object","properties":{"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Internal package ID"},"enrichment_status":{"$ref":"#/components/schemas/TrackingEnrichmentStatus"}}}},"all_settled":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"True when no further carrier data will arrive while you wait — stop polling. Use this rather than a package's "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"enrichment_status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to decide when to stop; a package can still report "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" once this is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}}},"id":"schema_10"}},"exampleStore":{"paths/~1api~1order/get/responses/200/content/application~1json/example":{"value":{"order":{"id":12345,"key":"abc123def456","platform_order_id":"gid://shopify/Order/1234567890","shop_order_name":"#1001","financial_status":"Paid","fulfillment_status":"Fulfilled","created_at":"2024-01-15T10:30:00Z","total_price":"$99.99 USD","protected":true,"line_items":[{"id":101,"quantity":2,"title":"Blue T-Shirt - Medium","fulfillment_status":"Fulfilled","price":"$49.99 USD","image_url":"https://cdn.shopify.com/s/files/image.jpg"}],"packages":[{"id":991023,"tracking_number":"1Z999AA10123456784","tracking_company":"UPS","tracking_url":"https://www.ups.com/track?tracknum=1Z999AA10123456784","tracking_links":[{"tracking_number":"1Z999AA10123456784","tracking_url":"https://www.ups.com/track?tracknum=1Z999AA10123456784"}],"current_status":"delivered","current_status_label":"Delivered","estimated_delivery_at":"2024-01-18T00:00:00Z","delivered_at":"2024-01-18T14:30:00Z","events":[{"id":1001,"status":"Delivered","message":"Package delivered to front door","happened_at":"Jan 18, 2024 2:30 PM","location":"New York, NY"}],"line_items":[{"id":101,"quantity":2,"title":"Blue T-Shirt - Medium","image_url":"https://cdn.shopify.com/s/files/image.jpg"}],"enrichment_status":"complete"}],"unfulfilled_line_items":[],"has_shippable_items":true,"has_fulfillment_without_tracking":false}},"id":"paths/~1api~1order/get/responses/200/content/application~1json/example"},"paths/~1api~1order/get/responses/404/content/application~1json/example":{"value":{},"id":"paths/~1api~1order/get/responses/404/content/application~1json/example"},"paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example":{"value":{"packages":[{"id":991023,"enrichment_status":"complete"},{"id":991024,"enrichment_status":"pending"}],"all_settled":false},"id":"paths/~1api~1order~1enrichment_status/get/responses/200/content/application~1json/example"},"paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example":{"value":{},"id":"paths/~1api~1order~1enrichment_status/get/responses/404/content/application~1json/example"}},"securitySchemeStore":{"api_key":{"id":"api_key","type":"apiKey","in":"header","paramName":"X-API-Key"}},"specVersion":"3.0.3","servers":[{"url":"https://app.useonward.com/api/v1"}],"specType":"openapi"},"options":{"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/apis/onward.json?download"},{"url":"/_bundle/apis/onward.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Onward API"}},"baseSlug":"/apis/onward","routesMapping":{}}