openapi: 3.0.4
info:
  title: Norce Checkout - Svea Checkout Adapter API
  description: >-
    Build 2026-01-14 10:19:48


    The Svea Checkout Adapter API is used to create and manage a Svea Checkout
    Order.
  version: 1.0.0
paths:
  /api/checkout/v1/admin/shipping/onboarding:
    post:
      tags:
        - Svea Administration
      summary: Set nShift configuration
      description: >-
        The Svea Checkout Shipping Module requires a few values in order to
        establish a proper integration with nShift.

        The onboarding endpoint is utilized for a one-time setup or when changes
        occur in your nshift credentials.
      operationId: SetOnboarding
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
      requestBody:
        description: nShift onboarding information
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SetupOnboardingModel'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json: {}
    get:
      tags:
        - Svea Administration
      summary: Get nShift configuration
      description: >-
        nShift configuration values used to establish a proper integration with
        nShift within Svea checkout.
      operationId: GetOnboarding
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingModel'
        '400':
          description: Bad Request
          content:
            application/json: {}
  /api/checkout/v1/admin/subscription:
    post:
      tags:
        - Svea Administration
      summary: Register subscription
      description: Registers a subscription for a merchant and channel with the Svea API.
      operationId: AddSubscription
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
                format: uuid
        '400':
          description: Bad Request
          content:
            application/json: {}
  /api/checkout/v1/admin/subscription/{subscription_id}:
    delete:
      tags:
        - Svea Administration
      summary: Remove subscription
      description: Removes a subscription from the Svea API.
      operationId: RemoveSubscription
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: subscription_id
          in: path
          description: Subscription id to remove
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
                format: uuid
        '400':
          description: Bad Request
          content:
            application/json: {}
  /api/checkout/v1/orders/{order_id}/payments:
    post:
      tags:
        - Payments
      summary: Create a new Svea Checkout order
      description: Requires an existing Norce order.
      operationId: CreateSveaCheckoutOrderPayment
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaCheckoutOrder'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json: {}
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
  /api/checkout/v1/orders/{order_id}/payments/recurring:
    post:
      tags:
        - Payments
      summary: >-
        Create a new Svea Checkout order using a recurring token from a previous
        Svea purchase.
      description: Requires an existing Norce order and Svea recurring token
      operationId: CreateSveaCheckoutRecurringOrderPayment
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: Recurring token that should be used for completing the order
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RecurringTokenModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaCheckoutRecurringOrder'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json: {}
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
  /api/checkout/v1/orders/{order_id}/payments/{payment_id}:
    get:
      tags:
        - Payments
      summary: Get an existing Svea Checkout order
      description: >-
        Used to get the html snippet, for example after the Svea Checkout Order
        has been confirmed.
      operationId: GetSveaCheckoutOrderPayment
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaCheckoutOrder'
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/checkout/v1/orders/{order_id}/payments/{payment_id}/remove:
    post:
      tags:
        - Payments
      summary: Remove a Svea Checkout order
      description: >-
        Requires an existing Norce order. Will do soft delete on any payments or
        shippings by setting state to removed. Will delete any hooks added when
        creating a Svea Checkout order.
      operationId: RemoveSveaCheckoutOrder
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment 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: {}
      security:
        - Bearer: []
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/validation:
    get:
      tags:
        - Svea Checkout Callbacks
      summary: Validation
      operationId: Validation
      parameters:
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaCheckoutValidationCallbackResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaCheckoutValidationCallbackResponse'
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/push:
    post:
      tags:
        - Svea Checkout Callbacks
      summary: Push
      description: Called whenever a Svea order’s CheckoutOrderStatus is changed
      operationId: Push
      parameters:
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/webhook:
    post:
      tags:
        - Svea Checkout Callbacks
      summary: Webhook
      description: >-
        When an Svea Checkout order has been finalized, the callback will be
        fired by Svea to notify the merchant about example any booked shipments
      operationId: Webhook
      parameters:
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      requestBody:
        description: Webhook information
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SveaCheckoutWebhook'
      responses:
        '200':
          description: OK
  /api/checkout/v1/callback/orders/event:
    post:
      tags:
        - Svea Checkout Callbacks
      summary: Events
      description: Endpoint for receiving Svea events from Order Management API
      operationId: Events
      parameters:
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      requestBody:
        description: Svea event
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SveaCheckoutEvent'
      responses:
        '200':
          description: OK
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/customer-update:
    post:
      tags:
        - Svea Checkout 'Client-side events' Callbacks
      summary: Refresh customer information on Norce order from svea order
      description: >-
        Updates customer information on Norce order with latest customer
        information from Svea Checkout
      operationId: UpdateCustomerFromSveaCheckout
      parameters:
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/shipping-option-update:
    post:
      tags:
        - Svea Checkout 'Client-side events' Callbacks
      summary: >-
        Shipping option update. The Norce order will be updated with the latest
        selected delivery information from svea
      description: >-
        Shipping option updated notifications. Will update the Norce order with
        latest shipping selection from svea
      operationId: ShippingOptionUpdate
      parameters:
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
        - name: merchant
          in: query
          description: Merchant identifier
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: Merchant channel
          required: true
          schema:
            type: string
      requestBody:
        description: Payload from client-side iframe event
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ShippingOptionUpdate'
      responses:
        '200':
          description: OK
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/cart-changed:
    post:
      tags:
        - Norce Callbacks
      summary: Handle Cart changed
      description: Cart changed.
      operationId: CartChanged
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      requestBody:
        description: Updated order
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NorceOrder'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PatchOperation'
        '404':
          description: Not Found
          content:
            application/json: {}
      deprecated: true
      security:
        - Bearer: []
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/update-payment:
    post:
      tags:
        - Norce Callbacks
      summary: Handle order changes
      description: Responds with patch for updated payment given an updated order.
      operationId: UpdatePayment
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      requestBody:
        description: Updated order
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NorceOrder'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PatchOperation'
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/state-changed:
    post:
      tags:
        - Norce Callbacks
      summary: Handle State changed
      description: State changed.
      operationId: StateChanged
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      requestBody:
        description: Updated order
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NorceOrder'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PatchOperation'
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/order/v1/orders/{order_id}/payments/{payment_id}:
    get:
      tags:
        - Order Management
      summary: Get an existing Svea Payment Administration order
      description: Used to get the order management (payment admin) order.
      operationId: GetOrderManagementOrder
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SveaOrderManagementOrder'
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/order/v1/orders/{order_id}/payments/{payment_id}/refresh:
    post:
      tags:
        - Order Management
      summary: Refresh the list of available PaymentActions for an order
      description: >-
        Refreshes the list of available payment actions on the payment to
        reflect the current payment state
      operationId: Refresh
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/order/v1/orders/{order_id}/payments/{payment_id}/capture:
    post:
      tags:
        - Order Management
      summary: Capture order
      description: Used to capture order
      operationId: CaptureOrder
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/order/v1/orders/{order_id}/payments/{payment_id}/cancel:
    post:
      tags:
        - Order Management
      summary: Cancel order
      description: Used to cancel order
      operationId: CancelOrder
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
      security:
        - Bearer: []
  /api/order/v1/orders/{order_id}/payments/{payment_id}/refund:
    post:
      tags:
        - Order Management
      summary: Refund order
      description: Used to refund a fully captured order
      operationId: RefundOrder
      parameters:
        - name: x-merchant
          in: header
          description: Merchant identifier.
          required: true
          schema:
            type: string
            example: norce
          example: norce
        - name: x-channel
          in: header
          description: Channel identifier
          required: true
          schema:
            type: string
            example: '1'
          example: '1'
        - name: order_id
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: payment_id
          in: path
          description: Payment identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json: {}
        '404':
          description: Not Found
          content:
            application/json: {}
      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
        postalCode:
          type: string
        city:
          type: string
        region:
          type: string
        country:
          type: string
        phone:
          type: string
        email:
          type: string
        nationalIdentificationNumber:
          type: string
        organizationIdentificationNumber:
          type: string
        attributes:
          type: object
          additionalProperties:
            nullable: true
      additionalProperties: false
    BillingReference:
      enum:
        - undefined
        - purchase
        - contactPerson
        - invoiceReference
        - costCenter
        - invoiceRecipient
        - letterNumber
        - accountingNumber
      type: string
    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
    Credit:
      type: object
      properties:
        actions:
          type: array
          items:
            type: string
        amount:
          type: integer
          format: int64
      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
    Delivery:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryAction'
        creationDate:
          type: string
          format: date-time
        creditedAmount:
          type: integer
          format: int64
        credits:
          type: array
          items:
            $ref: '#/components/schemas/Credit'
        deliveryAmount:
          type: integer
          format: int64
        dueDate:
          type: string
          format: date-time
        id:
          type: integer
          format: int64
        invoiceId:
          type: integer
          format: int64
        orderRows:
          type: array
          items:
            $ref: '#/components/schemas/OrderRow'
        status:
          type: string
      additionalProperties: false
    DeliveryAction:
      enum:
        - canCreditAmount
        - canCreditNewRow
        - canCreditOrderRows
      type: string
    DeliveryDetails:
      type: object
      properties:
        carrier:
          type: string
        class:
          type: string
        product:
          allOf:
            - $ref: '#/components/schemas/Product'
        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
    DiscountType:
      enum:
        - item
        - shipping
      type: string
    Error:
      type: object
      properties:
        code:
          enum:
            - internal-server-error
            - unauthorized
            - configuration-error
            - configuration-not-found
            - order-not-found
            - order-error
            - order-bad-request
            - order-conflict
            - order-validation
            - order-unknown-validation-error
            - shipping-not-found
            - shipping-error
            - payment-not-found
            - recurring-payment-not-found
            - payment-error
            - payment-conflict
            - svea-error
            - svea-bad-request
            - svea-validation
            - svea-order-not-found
            - translation-not-found
          type: string
          description: Error code
          example: cart-not-found
        message:
          type: string
          description: Detailed error information
          example: Cart with id:{id} now found.
        sveaError:
          allOf:
            - $ref: '#/components/schemas/SveaError'
          description: Error if originating from Svea
      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'
        logistics:
          allOf:
            - $ref: '#/components/schemas/Logistics'
        attributes:
          type: object
          additionalProperties:
            nullable: true
      additionalProperties: false
    Logistics:
      type: object
      properties:
        weight:
          type: integer
          format: int32
        height:
          type: integer
          format: int32
        width:
          type: integer
          format: int32
        length:
          type: integer
          format: int32
        tags:
          type: array
          items:
            type: string
        shippingDate:
          type: string
          format: date-time
      additionalProperties: false
    NorceOrder:
      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'
        total:
          allOf:
            - $ref: '#/components/schemas/Price'
        attributes:
          type: object
          additionalProperties:
            nullable: true
      additionalProperties: false
    OnboardingModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        accessToken:
          type: string
        deliveryCheckoutId:
          type: string
      additionalProperties: false
    OrderRow:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/OrderRowAction'
        articleNumber:
          type: string
        discountPercent:
          type: integer
          format: int64
        discountAmount:
          type: integer
          format: int64
        isCancelled:
          type: boolean
        orderRowId:
          type: integer
          format: int64
        quantity:
          type: integer
          format: int64
        unit:
          type: string
        unitPrice:
          type: integer
          format: int64
        vatPercent:
          type: integer
          format: int64
      additionalProperties: false
    OrderRowAction:
      enum:
        - canDeliverRow
        - canCancelRow
        - canCreditRow
        - canUpdateRow
      type: string
    OrderStatus:
      enum:
        - checkout
        - processing
        - accepted
        - completed
        - declined
      type: string
    PatchOperation:
      type: object
      properties:
        op:
          type: string
        path:
          type: string
        value: {}
      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
        actions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAction'
        recurring:
          allOf:
            - $ref: '#/components/schemas/Recurring'
      additionalProperties: false
    PaymentAction:
      type: object
      properties:
        id:
          type: string
        adapterId:
          type: string
        type:
          type: string
        url:
          type: string
      additionalProperties: false
    PaymentAdminAddress:
      type: object
      properties:
        city:
          type: string
        coAddress:
          type: string
        countryCode:
          type: string
        fullName:
          type: string
        postalCode:
          type: string
        streetAddress:
          type: string
      additionalProperties: false
    PaymentState:
      enum:
        - intent
        - removed
        - processing
        - failed
        - confirmed
        - pending
        - declined
        - reserved
        - credited
        - captured
        - cancelled
        - refunded
      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
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
        instance:
          type: string
      additionalProperties: {}
    Product:
      type: object
      properties:
        reference:
          type: string
        name:
          type: string
      additionalProperties: false
    Recurring:
      type: object
      properties:
        token:
          type: string
        description:
          type: string
        attributes:
          type: object
          additionalProperties:
            nullable: true
      additionalProperties: false
    RecurringTokenModel:
      type: object
      properties:
        token:
          type: string
      additionalProperties: false
    SetupOnboardingModel:
      type: object
      properties:
        NshiftCombinedId:
          type: string
        NshiftDeliveryCheckoutId:
          type: string
      additionalProperties: false
    Shipping:
      type: object
      properties:
        id:
          type: string
        merchant:
          type: string
        channel:
          type: string
        state:
          allOf:
            - $ref: '#/components/schemas/ShippingState'
        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
    ShippingOptionLocation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        address:
          allOf:
            - $ref: '#/components/schemas/ShippingOptionLocationAddress'
      additionalProperties: false
    ShippingOptionLocationAddress:
      type: object
      properties:
        city:
          type: string
        countryCode:
          type: string
        postalCode:
          type: string
        streetAddress:
          type: string
        streetAddress2:
          type: string
      additionalProperties: false
    ShippingOptionUpdate:
      type: object
      properties:
        id:
          type: string
        location:
          allOf:
            - $ref: '#/components/schemas/ShippingOptionLocation'
        orderId:
          type: string
        name:
          type: string
        carrier:
          type: string
        totalShippingFee:
          type: integer
          format: int64
      additionalProperties: false
    ShippingState:
      enum:
        - intent
        - removed
        - processing
        - failed
        - confirmed
      type: string
    State:
      type: object
      properties:
        currentStatus:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
      additionalProperties: false
    SveaCheckoutEvent:
      type: object
      properties:
        eventName:
          type: string
        checkoutOrderId:
          type: integer
          format: int64
        closeReason:
          type: string
        correlationId:
          type: string
          format: uuid
        timestampUtc:
          type: string
          format: date-time
      additionalProperties: false
    SveaCheckoutOrder:
      type: object
      properties:
        paymentId:
          type: string
          description: Norce Payment Id
        htmlSnippet:
          type: string
          description: Svea checkout order html snippet.
          example: |2-

                            <div id='svea-checkout-container'><script>alert('Initializing Svea Checkout');</script>
                            </div>
                        
      additionalProperties: false
    SveaCheckoutRecurringOrder:
      type: object
      properties:
        paymentId:
          type: string
          description: Norce Payment Id
      additionalProperties: false
    SveaCheckoutValidationCallbackResponse:
      type: object
      properties:
        valid:
          type: boolean
        clientOrderNumber:
          type: string
        message:
          type: string
      additionalProperties: false
    SveaCheckoutWebhook:
      type: object
      properties:
        type:
          type: string
        description:
          type: string
        orderId:
          type: integer
          format: int64
      additionalProperties: false
    SveaError:
      type: object
      properties:
        errorCode:
          type: string
        errorMessages:
          type: array
          items:
            type: string
        correlationId:
          type: string
      additionalProperties: false
    SveaOrderManagementOrder:
      type: object
      properties:
        actions:
          type: array
          items:
            type: string
        billingAddress:
          allOf:
            - $ref: '#/components/schemas/PaymentAdminAddress'
        cancelledAmount:
          type: integer
          format: int64
        creationDate:
          type: string
          format: date-time
        currency:
          type: string
        customerReference:
          type: string
        deliveries:
          type: array
          items:
            $ref: '#/components/schemas/Delivery'
        emailAddress:
          type: string
        id:
          type: integer
          format: int64
        isCompany:
          type: boolean
        merchantOrderId:
          type: string
        nationalId:
          type: string
        orderAmount:
          type: integer
          format: int64
        orderRows:
          type: array
          items:
            $ref: '#/components/schemas/OrderRow'
        orderStatus:
          type: string
        paymentType:
          type: string
        peppolId:
          type: string
        phoneNumber:
          type: string
        shippingAddress:
          allOf:
            - $ref: '#/components/schemas/PaymentAdminAddress'
        sveaWillBuy:
          type: boolean
        expirationDate:
          type: string
          format: date-time
        billingEmailAddress:
          type: string
        billingReferences:
          type: array
          items:
            $ref: '#/components/schemas/BillingReference'
        systemStatus:
          type: string
      additionalProperties: false
    Transition:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
        timeStamp:
          type: string
          format: date-time
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Authorization header using the bearer scheme. Example: 'Bearer
        a3bcdABCaB12abc3AbCDAB5AbcABCaBcABC5ab3c5A0='
      name: Authorization
      in: header
