{"items":[{"type":"link","label":"Callbacks","link":"/apis/callbacks","routeSlug":"/apis/callbacks","content":{"contentType":"overview","meta":{"name":"Callbacks"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"callbacks.json","url":"/_bundle/apis/callbacks.json?download"},{"kind":"download","label":"callbacks.yaml","url":"/_bundle/apis/callbacks.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://api.your-store.com/onward"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Callbacks (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"Onward calls these endpoints in your system to issue order refunds, reorders, store credit, protection refunds, and loyalty rewards. Events on our side trigger them, such as resolving a claim, a customer opting out of protection, or cashback being earned on an order. Register your callback URL in our system and respond to the requests described below."}],"sectionId":"/"}],"sectionId":"/"}]}]}},{"label":"Refund an order","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/callbacks/other/refundorder","routeSlug":"/apis/callbacks/other/refundorder","metadata":{"seo":{"title":"Refund an order","description":"Onward is requesting a refund of products for the specified Order in your platform. The onward_refundable object identifies the record that triggered the refund (for example, a Claim)."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"refundOrder","name":"Refund an order","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1refund/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Refund an order","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":"Onward is requesting a refund of products for the specified Order in your platform. The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"onward_refundable"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object identifies the record that triggered the refund (for example, a Claim)."},"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":"shopOrderId","in":"path","schemaId":"schema_0","description":"Your ID for the Order","required":true,"example":"18282"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund/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/~1orders~1{shopOrderId}~1refund/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1","pointer":"/paths/~1orders~1{shopOrderId}~1refund/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders/{shopOrderId}/refund","servers":[{"url":"https://api.your-store.com/onward"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"example":"18282","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":"schema_1"}},"responseCodes":["200","404","422"],"pointer":"/orders/{shopOrderId}/refund","href":"other/refundorder","openApiOperationId":"refundOrder","summary":"Refund an order"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.your-store.com/onward"}],"schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_1"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Order refunded successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/refundorder"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/refund"},{"label":"Refund an order's protection","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/callbacks/other/refundorderprotection","routeSlug":"/apis/callbacks/other/refundorderprotection","metadata":{"seo":{"title":"Refund an order's protection","description":"Onward is requesting a refund of the Onward protection premium for the specified Order in your platform, for example when a customer opts out of protection."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"refundOrderProtection","name":"Refund an order's protection","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Refund an order's protection","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Onward is requesting a refund of the Onward protection premium for the specified Order in your platform, for example when a customer opts out of 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":"Your ID for the Order","required":true,"example":"18282"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/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/~1orders~1{shopOrderId}~1refund_protection/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_3"}},"schemaId":"schema_3","pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders/{shopOrderId}/refund_protection","servers":[{"url":"https://api.your-store.com/onward"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"example":"18282","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":"schema_3"}},"responseCodes":["200","404","422"],"pointer":"/orders/{shopOrderId}/refund_protection","href":"other/refundorderprotection","openApiOperationId":"refundOrderProtection","summary":"Refund an order's protection"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.your-store.com/onward"}],"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":"200","description":"Protection refunded successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1orders~1{shopOrderId}~1refund_protection/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/refundorderprotection"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/refund_protection"},{"label":"Reorder items","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/callbacks/other/reorderorder","routeSlug":"/apis/callbacks/other/reorderorder","metadata":{"seo":{"title":"Reorder items","description":"Onward is requesting a reorder of products for the Order in your platform.In addition to replying with shop_order_id & shop_order_number you also need to send the order in the regular channel (POST /orders)."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"reorderOrder","name":"Reorder items","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1reorder/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Reorder items","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":"Onward is requesting a reorder of products for the Order in your platform."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In addition to replying with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_order_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" & "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"shop_order_number"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" you also need to send the order in the regular channel ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /orders"},"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":"shopOrderId","in":"path","schemaId":"schema_0","description":"Your ID for the original Order","required":true,"example":"190102"}],"pointer":"/paths/~1orders~1{shopOrderId}~1reorder/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/~1orders~1{shopOrderId}~1reorder/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4","pointer":"/paths/~1orders~1{shopOrderId}~1reorder/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders/{shopOrderId}/reorder","servers":[{"url":"https://api.your-store.com/onward"}],"parameters":{"path":[{"name":"shopOrderId","in":"path","required":true,"example":"190102","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":"schema_4"}},"responseCodes":["200","404","422"],"pointer":"/orders/{shopOrderId}/reorder","href":"other/reorderorder","openApiOperationId":"reorderOrder","summary":"Reorder items"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.your-store.com/onward"}],"schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_4"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Reorder created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}},"schemaId":"schema_5"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1orders~1{shopOrderId}~1reorder/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/reorderorder"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/reorder"},{"label":"Issue store credit","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/callbacks/other/issuestorecredit","routeSlug":"/apis/callbacks/other/issuestorecredit","metadata":{"seo":{"title":"Issue store credit","description":"Onward is requesting store credit to be issued for a specific Order in your platform."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"issueStoreCredit","name":"Issue store credit","isWebhook":false,"pointer":"/paths/~1orders~1{shopOrderId}~1store_credit/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Issue store credit","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Onward is requesting store credit to be issued for a specific Order in your platform."},{"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":"Your ID for the Order","required":true}],"pointer":"/paths/~1orders~1{shopOrderId}~1store_credit/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/~1orders~1{shopOrderId}~1store_credit/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_6"}},"schemaId":"schema_6","pointer":"/paths/~1orders~1{shopOrderId}~1store_credit/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders/{shopOrderId}/store_credit","servers":[{"url":"https://api.your-store.com/onward"}],"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":"schema_6"}},"responseCodes":["200","404","422"],"pointer":"/orders/{shopOrderId}/store_credit","href":"other/issuestorecredit","openApiOperationId":"issueStoreCredit","summary":"Issue store credit"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.your-store.com/onward"}],"schemaId":"schema_6","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_6"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Store credit issued successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}},"schemaId":"schema_7"},{"code":"404","description":"Order not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1orders~1{shopOrderId}~1store_credit/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/issuestorecredit"}],"panels":[]}]},"httpPath":"/orders/{shopOrderId}/store_credit"},{"label":"Issue a reward","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/callbacks/other/issuereward","routeSlug":"/apis/callbacks/other/issuereward","metadata":{"seo":{"title":"Issue a reward","description":"Onward is requesting a reward to be issued for the specified Customer in your platform, for example when an order earns cashback. One request is sent per credit."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"issueReward","name":"Issue a reward","isWebhook":false,"pointer":"/paths/~1customers~1{shopCustomerId}~1reward/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Issue a reward","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Onward is requesting a reward to be issued for the specified Customer in your platform, for example when an order earns cashback. One request is sent per credit."},{"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":"Your ID for the Customer","required":true,"example":"7461"}],"pointer":"/paths/~1customers~1{shopCustomerId}~1reward/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}~1reward/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_8"}},"schemaId":"schema_8","pointer":"/paths/~1customers~1{shopCustomerId}~1reward/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/customers/{shopCustomerId}/reward","servers":[{"url":"https://api.your-store.com/onward"}],"parameters":{"path":[{"name":"shopCustomerId","in":"path","required":true,"example":"7461","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":"schema_8"}},"responseCodes":["200","404","422"],"pointer":"/customers/{shopCustomerId}/reward","href":"other/issuereward","openApiOperationId":"issueReward","summary":"Issue a reward"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.your-store.com/onward"}],"schemaId":"schema_8","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_8"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Reward issued successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}},"schemaId":"schema_9"},{"code":"404","description":"Customer not found"},{"code":"422","description":"Validation exception"}],"pointer":"/paths/~1customers~1{shopCustomerId}~1reward/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_9","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}}},{"code":"404"},{"code":"422"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/issuereward"}],"panels":[]}]},"httpPath":"/customers/{shopCustomerId}/reward"}],"store":{"schemaStore":{"components/schemas/Order":{"id":"components/schemas/Order","kind":"json-schema","title":"Order","data":{"type":"object","properties":{"shop_order_id":{"type":"string","description":"Your ID for the Order","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"}]},"created_at":{"type":"string","format":"date-time","description":"When the order was placed in your e-comm platform","example":"2024-11-26T17:32:28Z"},"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_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/UpdateOrder":{"id":"components/schemas/UpdateOrder","kind":"json-schema","title":"UpdateOrder","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 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"}]},"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/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/Customer":{"id":"components/schemas/Customer","kind":"json-schema","title":"Customer","data":{"type":"object","properties":{"shop_customer_id":{"type":"string","description":"Your ID for the Customer","example":"7461"},"first_name":{"type":"string","nullable":true,"example":"Sally"},"last_name":{"type":"string","nullable":true,"example":"Loo"},"email":{"type":"string","format":"email","nullable":true,"example":"sally@example.com"},"phone_number":{"type":"string","format":"phone","nullable":true,"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":"Your ID for the Line Item","example":"816721"},"shop_product_id":{"type":"string","description":"Your ID for the product","example":"142"},"shop_variant_id":{"type":"string","description":"Your ID or SKU for the variant","example":"7261"},"name":{"type":"string","description":"Name for the product and variant purchased","example":"Cool T-shirt - Red"},"unit_price":{"description":"Item price in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price":{"description":"Line item total in shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"total_price_presentment":{"description":"Line item total in customer's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"quantity":{"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":{"description":"Weight of the item in grams","example":24},"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 shop'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","image_url","grams"]}},"schema_0":{"kind":"json-schema","data":{"type":"string"},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"object","properties":{"shop_order_id":{"type":"string","description":"Your ID for the Order this refund relates to","example":"18282"},"onward_refundable":{"type":"object","description":"Record that triggered this refund","properties":{"id":{"type":"integer","format":"int32","description":"Our ID","example":"456001"},"type":{"type":"string","description":"Kind of record","example":"Claim"}},"required":["id","type"]},"line_items":{"type":"array","items":{"type":"object","properties":{"to_issue_amount":{"description":"Amount to refund in the specified currency","type":"object","properties":{"currency":{"type":"string","example":"USD"},"cents":{"type":"integer","format":"int32","example":1099}}},"to_issue_amount_presentment":{"description":"Amount to refund in the currency the customer uses","type":"object","properties":{"currency":{"type":"string","example":"CAD"},"cents":{"type":"integer","format":"int32","example":1525}}},"shop_line_item_id":{"type":"string","description":"Your ID for the line item being refunded","example":"91827"},"quantity_to_issue":{"type":"integer","format":"int32","description":"Number of items to refund","example":1}},"required":["to_issue_amount","to_issue_amount_presentment","shop_line_item_id","quantity_to_issue"]}}},"required":["shop_order_id","line_items","onward_refundable"]},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"object","properties":{"shop_refund_id":{"type":"string","description":"Your ID for the refund","example":"123456"}},"required":["shop_refund_id"]},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"protection_amount":{"description":"The Onward protection premium to refund, in the shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]}},"required":["protection_amount"]},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"object","properties":{"onward_reorderable":{"type":"object","description":"Record that triggered this reorder","properties":{"id":{"type":"integer","format":"int32","description":"Our ID","example":"356001"},"type":{"type":"string","description":"Kind of record","example":"Claim"}},"required":["id","type"]},"line_items":{"type":"array","items":{"type":"object","properties":{"shop_line_item_id":{"type":"string","description":"The line item ID from the original order","example":"LI-1989"},"quantity_to_issue":{"type":"integer","description":"The quantity to reorder"}},"required":["shop_line_item_id","quantity_to_issue"]}},"customer":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"phone_number":{"type":"string"}}},"shipping_address":{"$ref":"#/components/schemas/Address"}},"required":["shipping_address","customer","line_items","onward_reorderable"]},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"object","properties":{"shop_order_id":{"type":"string","description":"Your ID for the new Order","example":"123456"},"shop_order_number":{"type":"string","description":"The Order Number of this new Order as presented to the customer","example":"IN-94713"}},"required":["shop_order_id","shop_order_number"]},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"object","properties":{"customer":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"phone_number":{"type":"string"}}},"to_issue_amount":{"description":"Amount to refund in the specified currency","type":"object","properties":{"currency":{"type":"string","example":"USD"},"cents":{"type":"integer","format":"int32","example":1099}},"required":["currency","cents"]}},"required":["customer","to_issue_amount"]},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"object","properties":{"shop_store_credit_code":{"type":"string","description":"The customer-facing code for the store credit","example":"GC123456"},"shop_store_credit_id":{"type":"string","description":"Your internal ID for the store credit","example":"SC789"},"initial_value":{"type":"object","description":"Initial balance of this store credit","properties":{"currency":{"type":"string","example":"USD"},"cents":{"type":"integer","format":"int32","example":1099}}},"balance":{"type":"object","description":"Current balance of this store credit","properties":{"currency":{"type":"string","example":"USD"},"cents":{"type":"integer","format":"int32","example":1099}}},"note":{"type":"string","description":"Any note for this store credit"}},"required":["shop_store_credit_code","shop_store_credit_id","initial_value","balance"]},"id":"schema_7"},"schema_8":{"kind":"json-schema","data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"},"to_issue_amount":{"description":"Amount to credit, in the shop's currency","allOf":[{"$ref":"#/components/schemas/Money"}]},"onward_reward_transaction_id":{"type":"integer","format":"int64","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Our ID for this specific credit. Stable across retries — a repeated request with the same value should return the same shop_transaction_id rather than issuing a second credit."},"children":[]}]}]}],"example":456001}},"required":["customer","to_issue_amount","onward_reward_transaction_id"]},"id":"schema_8"},"schema_9":{"kind":"json-schema","data":{"type":"object","properties":{"shop_transaction_id":{"type":"string","description":"Your ID for this credit","example":"rw_789"},"shop_reward_id":{"type":"string","description":"Your ID for the redemption method (discount code, store credit, etc) the credit was added to. Onward stores it on the customer's reward.","example":"1234567890"}},"required":["shop_transaction_id","shop_reward_id"]},"id":"schema_9"}},"exampleStore":{},"securitySchemeStore":{"api_key":{"id":"api_key","type":"apiKey","in":"header","paramName":"X-API-Key"}},"specVersion":"3.0.3","servers":[{"url":"https://api.your-store.com/onward"}],"specType":"openapi"},"options":{"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/apis/callbacks.json?download"},{"url":"/_bundle/apis/callbacks.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Callbacks","description":"Onward calls these endpoints in your system to issue order refunds, reorders, store credit, protection refunds, and loyalty rewards. Events on our side trigger them, such as resolving a claim, a customer opting out of protection, or cashback being earned on an order. Register your callback URL in our system and respond to the requests described below."}},"baseSlug":"/apis/callbacks","routesMapping":{}}