{"openapi":"3.0.4","info":{"title":"Norce Checkout - Jetshop Cart Adapter API","description":"Build 2025-06-30 12:57:08\n\nAn adapter service connecting Norce Checkout to Jetshop Commerce.","version":"0.2.0"},"servers":[{"url":"https://checkout-jetshop-adapter.test.norce.tech","description":"Test server"}],"paths":{"/api/v1/orders":{"post":{"tags":["Order Adapter"],"summary":"Create Order from cart","operationId":"CreateOrder","parameters":[{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The context required to create a order.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SessionContext"}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/api/v1/orders/redirect":{"get":{"tags":["Order Adapter"],"summary":"Create order from cart and then redirect to checkout.","operationId":"CreateOrderAndRedirect","parameters":[{"name":"cartId","in":"query","description":"Jetshop cart id","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","description":"Merchant channel.","required":true,"schema":{"type":"string"}},{"name":"culture","in":"query","description":"Language and region of the customer.","required":true,"schema":{"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z]{2,2})*$","type":"string"}},{"name":"currency","in":"query","description":"Currency of the purchase. ISO 4217.","schema":{"pattern":"^[A-Za-z]{3,3}$","type":"string"}},{"name":"country","in":"query","description":"Country","schema":{"pattern":"^[A-Za-z]{2,2}$","type":"string"}},{"name":"auth","in":"query","description":"Authentication token","schema":{"type":"string"}}],"responses":{"302":{"description":"Found"},"400":{"description":"Bad Request","content":{"application/json":{}}},"404":{"description":"Not Found","content":{"application/json":{}}}}}},"/api/v1/orders/{order_id}":{"put":{"tags":["Order Adapter"],"summary":"Update Order from cart","operationId":"UpdateOrder","parameters":[{"name":"order_id","in":"path","description":"Checkout order identifier.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/api/v1/orders/{order_id}/items/{item_id}":{"patch":{"tags":["Order Adapter"],"summary":"Update cart item","operationId":"UpdateOrderItem","parameters":[{"name":"order_id","in":"path","description":"Order id to update.","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","description":"Cart item id to update.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Item with patchable fields.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PatchableItem"}]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]},"delete":{"tags":["Order Adapter"],"summary":"Delete cart item","operationId":"DeleteOrderItem","parameters":[{"name":"order_id","in":"path","description":"Order id to update.","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","description":"Cart item id to delete.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/api/v1/orders/{order_id}/discounts":{"post":{"tags":["Order Adapter"],"summary":"Add discount code","operationId":"AddOrderDiscount","parameters":[{"name":"order_id","in":"path","description":"Checkout order identifier.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The discount to be added.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DiscountCode"}]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]},"delete":{"tags":["Order Adapter"],"summary":"Remove discount discountCode","operationId":"RemoveOrderDiscount","parameters":[{"name":"order_id","in":"path","description":"Checkout order identifier.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Discount code.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DiscountCode"}]}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/api/v1/orders/{order_id}/validate":{"post":{"tags":["Order Adapter"],"summary":"Validate order. Make sure all products are buyable.","operationId":"ValidateOrder","parameters":[{"name":"order_id","in":"path","description":"Checkout order identifier.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/api/v1/orders/{order_id}/order-state-changed":{"post":{"tags":["Order Adapter"],"summary":"When order state is Processing. Will validate order.\nWhen order state is Accepted. Will reduce stock and remove the cart.","description":"Order state changed.","operationId":"OrderStateChanged","parameters":[{"name":"order_id","in":"path","description":"Checkout order identifier.","required":true,"schema":{"type":"string"}},{"name":"x-merchant","in":"header","description":"Merchant identifier.","required":true,"schema":{"type":"string"}},{"name":"x-channel","in":"header","description":"Channel identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Updated order","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Order"}]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}}},"components":{"schemas":{"Addon":{"type":"object","properties":{"reference":{"type":"string"},"price":{"type":"number","format":"double"}},"additionalProperties":false},"Address":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/CustomerType"}]},"givenName":{"type":"string"},"familyName":{"type":"string"},"careOf":{"type":"string"},"reference":{"type":"string"},"organizationName":{"type":"string"},"streetAddress":{"type":"string"},"streetAddress2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"Callback":{"type":"object","properties":{"id":{"type":"string"},"adapterId":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false},"Cart":{"type":"object","properties":{"reference":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"total":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"Consent":{"type":"object","properties":{"id":{"type":"string"},"checked":{"type":"boolean"},"text":{"type":"string"},"required":{"type":"boolean"}},"additionalProperties":false},"Customer":{"type":"object","properties":{"billing":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"shipping":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"type":{"allOf":[{"$ref":"#/components/schemas/CustomerType"}]},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"CustomerType":{"enum":["person","organization"],"type":"string"},"DeliveryDetails":{"type":"object","properties":{"carrier":{"type":"string"},"class":{"type":"string"},"product":{"allOf":[{"$ref":"#/components/schemas/ShippingProduct"}]},"pickupLocation":{"allOf":[{"$ref":"#/components/schemas/PickupLocation"}]}},"additionalProperties":false},"Discount":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/DiscountType"}]},"name":{"type":"string"},"code":{"type":"string"},"value":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"DiscountCode":{"type":"object","properties":{"code":{"type":"string","description":"Discount code."}},"additionalProperties":false},"DiscountType":{"enum":["item","shipping"],"type":"string"},"Error":{"type":"object","properties":{"code":{"type":"string","description":"Error code","example":"order-not-found"},"message":{"type":"string","description":"Detailed error information","example":"Order {id} could not be found"}},"additionalProperties":false},"Hook":{"type":"object","properties":{"id":{"type":"string"},"adapterId":{"type":"string"},"subscribeTo":{"type":"string"},"target":{"type":"string"},"invoke":{"type":"string"}},"additionalProperties":false},"Item":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"name":{"type":"string"},"sku":{"type":"string"},"url":{"type":"string"},"imageUrl":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"unit":{"type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"total":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"originalTotal":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"vatRate":{"type":"number","format":"double"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"Order":{"type":"object","properties":{"id":{"type":"string"},"merchant":{"type":"string"},"channel":{"type":"string"},"reference":{"type":"string"},"created":{"type":"string","format":"date-time"},"lastModified":{"type":"string","format":"date-time"},"state":{"allOf":[{"$ref":"#/components/schemas/State"}]},"culture":{"type":"string"},"currency":{"type":"string"},"country":{"type":"string"},"cart":{"allOf":[{"$ref":"#/components/schemas/Cart"}]},"shippings":{"type":"array","items":{"$ref":"#/components/schemas/Shipping"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"customer":{"allOf":[{"$ref":"#/components/schemas/Customer"}]},"consents":{"type":"array","items":{"$ref":"#/components/schemas/Consent"}},"hooks":{"type":"array","items":{"$ref":"#/components/schemas/Hook"}},"validations":{"type":"array","items":{"$ref":"#/components/schemas/Callback"}},"total":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"OrderStatus":{"enum":["checkout","processing","accepted","completed","declined"],"type":"string"},"PatchableItem":{"type":"object","properties":{"quantity":{"type":"integer","description":"Quantity of item. Must be greater or equal to 1.","format":"int32","example":2}},"additionalProperties":false},"Payment":{"type":"object","properties":{"id":{"type":"string"},"adapterId":{"type":"string"},"name":{"type":"string"},"merchant":{"type":"string"},"channel":{"type":"string"},"currency":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/PaymentType"}]},"orderId":{"type":"string"},"amount":{"type":"number","format":"double"},"upperLimitAmount":{"type":"number","format":"double"},"state":{"allOf":[{"$ref":"#/components/schemas/PaymentState"}]},"reference":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"PaymentState":{"enum":["intent","removed","processing","failed","confirmed","pending","declined","reserved","credited","captured"],"type":"string"},"PaymentType":{"enum":["default","prepaid","voucher"],"type":"string"},"PickupLocation":{"type":"object","properties":{"reference":{"type":"string"},"name":{"type":"string"},"address":{"allOf":[{"$ref":"#/components/schemas/PickupLocationAddress"}]}},"additionalProperties":false},"PickupLocationAddress":{"type":"object","properties":{"streetAddress":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"additionalProperties":false},"Price":{"type":"object","properties":{"includingVat":{"type":"number","format":"double"},"excludingVat":{"type":"number","format":"double"}},"additionalProperties":false},"SessionContext":{"required":["cartId","culture"],"type":"object","properties":{"cartId":{"minLength":1,"type":"string","description":"Jetshop cart id","example":"e6c59736-d688-4030-aab3-ece337f434c6"},"culture":{"minLength":1,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z]{2,2})*$","type":"string","description":"Language and region of the customer, RFC-1766","example":"sv-SE"},"currency":{"pattern":"^[A-Za-z]{3,3}$","type":"string","description":"Currency of the purchase, ISO 4217 alpha-3.","example":"SEK"},"country":{"pattern":"^[A-Za-z]{2,2}$","type":"string","description":"Country, ISO 3166 alpha-2.","example":"SE"}},"additionalProperties":false},"Shipping":{"type":"object","properties":{"id":{"type":"string"},"merchant":{"type":"string"},"channel":{"type":"string"},"reference":{"type":"string"},"tmsReference":{"type":"string"},"orderId":{"type":"string"},"adapterId":{"type":"string"},"name":{"type":"string"},"total":{"allOf":[{"$ref":"#/components/schemas/Price"}]},"vatRate":{"type":"number","format":"double"},"deliveryDetails":{"allOf":[{"$ref":"#/components/schemas/DeliveryDetails"}]},"addons":{"type":"array","items":{"$ref":"#/components/schemas/Addon"}},"attributes":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"ShippingProduct":{"type":"object","properties":{"reference":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"State":{"type":"object","properties":{"currentStatus":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}]},"transitions":{"type":"array","items":{"$ref":"#/components/schemas/Transition"}}},"additionalProperties":false},"Transition":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrderStatus"}]},"timeStamp":{"type":"string","format":"date-time"}},"additionalProperties":false},"ValidationError":{"type":"object","properties":{"code":{"type":"string"},"adapterId":{"type":"string"}},"additionalProperties":false}},"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authorization header using the bearer scheme. Example: 'Bearer a3bcdABCaB12abc3AbCDAB5AbcABCaBcABC5ab3c5A0='","name":"Authorization","in":"header"}}}}