openapi: 3.0.4
info:
  title: Norce.Checkout.Notification
  version: 'Created: 12/02/2025 08:33:13'
servers:
  - url: https://norce-open-beta.api-se.playground.norce.tech/checkout/notification
    description: Public
  - url: https://notification.checkout.test.internal.norce.tech
    description: Internal Test
  - url: https://notification.checkout.playground.internal.norce.tech
    description: Internal Playground
  - url: https://notification.checkout.stage.internal.norce.tech
    description: Internal Stage
  - url: https://notification.checkout.prod.internal.norce.tech
    description: Internal Production
paths:
  /api/v1/events:
    get:
      tags:
        - Events
      parameters:
        - name: x-merchant
          in: header
          required: true
          schema:
            type: string
        - name: channel
          in: query
          schema:
            type: string
        - name: adapter_id
          in: query
          schema:
            type: string
        - name: reference
          in: query
          schema:
            type: string
        - name: order_id
          in: query
          schema:
            type: string
        - name: offset
          in: query
          description: Pagination offset
          schema:
            type: integer
            format: int32
            default: 0
        - name: limit
          in: query
          description: Pagination limit
          schema:
            type: integer
            format: int32
            default: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationEventPaginationSet'
      security:
        - Bearer: []
  /api/v1/events/{event_id}:
    get:
      tags:
        - Events
      parameters:
        - name: x-merchant
          in: header
          required: true
          schema:
            type: string
        - name: event_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationEvent'
      security:
        - Bearer: []
  /api/v1/events/{event_id}/retry:
    post:
      tags:
        - Events
      parameters:
        - name: x-merchant
          in: header
          required: true
          schema:
            type: string
        - name: event_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
      security:
        - Bearer: []
components:
  schemas:
    Addon:
      type: object
      properties:
        reference:
          type: string
          description: Shipping addon reference.
        price:
          type: number
          description: Cost of addon. Amount in major unit currency.
          format: double
      additionalProperties: false
    Address:
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/CustomerType'
          description: The type of customer
          example: Person
        givenName:
          type: string
          description: Given name or first name.
          example: Rosalinainho
        familyName:
          type: string
          description: Family name or last name.
          example: Undulatsson
        careOf:
          type: string
          description: Care of.
          example: Olleinho Jyckesson
        reference:
          type: string
          description: Reference to the customer
        organizationName:
          type: string
          description: Name of the Organization
          example: Storm
        streetAddress:
          type: string
          description: Address or street name, first line.
          example: Adaptivevägen 18
        streetAddress2:
          type: string
          description: Address or street name, second line.
          example: Lgh 1203
        postalCode:
          type: string
          description: Postal code, zip or post code.
          example: 955 60
        city:
          type: string
          description: City.
          example: Boden
        region:
          type: string
          description: State or region.
          example: Norrbotten
        country:
          type: string
          description: Country. ISO 3166 alpha-2.
          example: SE
        phone:
          type: string
          description: Phone number.
          example: '0753892233'
        email:
          type: string
          description: E-mail address.
          example: rosalinainho.undulatsson@example.com
        nationalIdentificationNumber:
          type: string
          description: >-
            Number used to identify individuals. Eg. could be used for Personal
            identity number (personnummer) in Sweden.
          example: 890201-3286
        organizationIdentificationNumber:
          type: string
          description: >-
            Number used to identify organizations or legal persons. Eg. could be
            used for Corporate identity number

            (organisationsnummer) in Sweden.
          example: 212000-1355
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the address.
      additionalProperties: false
    Callback:
      type: object
      properties:
        id:
          type: string
          description: Unique ID for the callback.
          readOnly: true
          example: oc_BaDIudFOjBEuFmLlmDExePUFTh
        adapterId:
          type: string
          description: Callback Adapter ID.
          example: jetshop_adapter
        url:
          type: string
          description: >-
            Full valid url to be called by POST. If the url contains the
            substring '{order_id}' it will be replaced with the

            orders id

            before call is performed.
          example: >-
            http://specific-feature-adapter.norce.io/api/v1/callbacks/orders/{order_id}/specific-callback
      additionalProperties: false
    Cart:
      type: object
      properties:
        reference:
          type: string
          description: Cart Reference
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
          description: List of Items
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/Discount'
          description: List of Discounts
        total:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Cart total excluding shipping fees
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for cart.
      additionalProperties: false
    Consent:
      type: object
      properties:
        id:
          type: string
          description: Unique ID for the consent item.
          example: ci_newsleter
        checked:
          type: boolean
          description: Consent checked status.
        text:
          type: string
          description: Consent description.
        required:
          type: boolean
          description: Required for transition order state to processing
      additionalProperties: false
    Customer:
      required:
        - type
      type: object
      properties:
        billing:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: Billing address to the customer
        shipping:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: Shipping address to the customer
        type:
          allOf:
            - $ref: '#/components/schemas/CustomerType'
          description: The type of customer
          example: Person
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the customer.
      additionalProperties: false
    CustomerType:
      enum:
        - person
        - organization
      type: string
    DeliveryDetails:
      type: object
      properties:
        carrier:
          type: string
          description: Carrier name.
        class:
          type: string
          description: Shipping class.
        product:
          allOf:
            - $ref: '#/components/schemas/Product'
          description: Shipping product.
        pickupLocation:
          allOf:
            - $ref: '#/components/schemas/PickupLocation'
          description: Pickup location.
      additionalProperties: false
    Discount:
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/DiscountType'
          description: Indicates if the discount applies to items or shipping.
        name:
          type: string
          description: Name of the discount.
        code:
          type: string
          description: Discount code.
        value:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Total sum of discount.
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the discount.
      additionalProperties: false
    DiscountType:
      enum:
        - item
        - shipping
      type: string
    Hook:
      type: object
      properties:
        id:
          type: string
          description: Unique ID for the callback.
          readOnly: true
          example: oc_BaDIudFOjBEuFmLlmDExePUFTh
        adapterId:
          type: string
          description: Callback Adapter ID.
          example: jetshop_adapter
        subscribeTo:
          type: string
          description: Callback event.
        target:
          type: string
          description: Callback event.
        invoke:
          type: string
          description: >-
            Full valid url to be called by POST. If the url contains the
            substring '{order_id}' it will be replaced with the

            orders id

            before call is performed.
          example: >-
            http://specific-feature-adapter.norce.io/api/v1/callbacks/orders/{order_id}/specific-callback
      additionalProperties: false
    Item:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the order
          example: ci_FpEzyBvBBUyKxkeNriFUxZOCje
        reference:
          type: string
          description: Optional. Platform cart item reference.
        name:
          type: string
          description: Descriptive name of the item.
          example: T-Shirt XL
        sku:
          type: string
          description: SKU or article number.
          example: A000123
        url:
          type: string
          description: URL to the product page.
          example: https://example.com/products/A000123
        imageUrl:
          type: string
          description: URL to an image showing the item.
          example: https://example.com/products/A000123/images/1
        quantity:
          type: integer
          description: Quantity of the item.
          format: int32
          example: 2
        unit:
          type: string
          description: Unit used to describe the quantity. Ex. st, kg
          example: st
        price:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Unit price, excluding discount
        total:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Total sum for all quantities including discount.
        originalTotal:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Total sum for all quantities excluding discount.
        vatRate:
          type: number
          description: Value-added tax. 25% would be input as 0.25.
          format: double
          example: 0.25
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/Discount'
          description: Discounts applied to item.
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the item.
      additionalProperties: false
    Notification:
      required:
        - id
        - invoke
        - reference
        - scope
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Unique ID for the Notification
          example: ocGooDddTOjKOuFmNnkEozEpfuTh
        adapterId:
          type: string
          description: >-
            Identifier for the system responsible for this notification. If any
            reference to configuration is made inside curly

            braces in Invoke the configuration is found using this identifier.
          example: jetshop_adapter
        reference:
          minLength: 1
          type: string
          description: >-
            Reference for the Notification. Should (but not required to) be
            unique for the order. Used to track notifications

            across different orders.
          example: PuXCudQEiWTOHvquGGolFUVOuy
        description:
          type: string
          description: Purpose or effect of the notification.
          example: Export payment information to Jetshop when order has been completed.
        scope:
          minLength: 1
          type: string
          description: >-
            Valid json path inside the order. Does not support scope inside
            arrays.
          example: /state/currentStatus
        schema:
          type: object
          additionalProperties: {}
          description: >-
            Json schema (https://json-schema.org/draft/2020-12/schema) on the
            scope. Notification triggers when a change occurs

            on the scope and the schema is valid for the scope.
          example:
            const: completed
        invoke:
          minLength: 1
          type: string
          description: >-
            Url to invoke on notification trigger. Can include references to
            adapter configuration and order inside curly

            braces.
          example: >-
            {configuration.adapter.internalUrl}/api/v1/callbacks/orders/{order.id}/specific-callback
      additionalProperties: false
    NotificationEvent:
      required:
        - attempts
        - channel
        - createdAt
        - id
        - merchant
        - orderId
        - payload
        - reference
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Unique identifier of the event message. Supplied by service bus.
          example: 018f1ac8-7409-724b-b864-0a0a049719e2
        createdAt:
          minLength: 1
          type: string
          description: The time the event was created. Supplied by service bus.
          example: '2024-04-26T09:09:14.382889Z'
        merchant:
          minLength: 1
          type: string
          description: Merchant identifier.
          example: norce-checkout-demo
        channel:
          minLength: 1
          type: string
          description: Merchant channel.
          example: b2c
        orderId:
          minLength: 1
          type: string
          description: Order Id.
          example: oanzNtkz
        adapterId:
          type: string
          description: Adapter Id.
          example: norce-commerce-adapter
        reference:
          minLength: 1
          type: string
          description: Notification Reference.
          example: norce-commerce-adapter-export-on-accepted
        description:
          type: string
          description: Notification Description.
          example: >-
            Export the order to Norce Commerce when order status reaches
            Accepted
        payload:
          allOf:
            - $ref: '#/components/schemas/NotificationEventPayload'
          description: The message payload of the event.
        attempts:
          type: array
          items:
            $ref: '#/components/schemas/NotificationEventAttempt'
          description: The attempts made to process the event.
      additionalProperties: false
      description: Notification event model in the context of an audit log
    NotificationEventAttempt:
      required:
        - id
        - statusCode
        - timestamp
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Generated id for the specific attempt made.
          example: a55f104a-18ca-4596-b813-f232a0aecb28
        timestamp:
          minLength: 1
          type: string
          description: Timestamp for when the attempt was made.
          example: '2024-04-26T09:09:15.174893Z'
        statusCode:
          type: integer
          description: Status Code received in response.
          format: int32
          example: 200
        responseBody:
          allOf:
            - $ref: '#/components/schemas/ProblemDetails'
          description: >-
            ProblemDetails if supplied on non-successful response, null
            otherwise.
        responseHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers received in response.
          example:
            date:
              - Fri, 26 Apr 2024 09:09:15 GMT
      additionalProperties: false
    NotificationEventPaginationSet:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/NotificationEvent'
          description: Data set
          readOnly: true
        pagination:
          allOf:
            - $ref: '#/components/schemas/Pagination'
          description: Pagination meta data
          readOnly: true
      additionalProperties: false
    NotificationEventPayload:
      required:
        - notification
        - order
      type: object
      properties:
        notification:
          allOf:
            - $ref: '#/components/schemas/Notification'
          description: >-
            Notification as it appeared on the order at the time when the event
            occured.
        order:
          allOf:
            - $ref: '#/components/schemas/Order'
          description: Order as it appeared at the time when the event occured.
      additionalProperties: false
    Order:
      required:
        - channel
        - merchant
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the order.
          readOnly: true
          example: o_yClTSySjyAuuBjmiBlHCjuEcTf
        merchant:
          minLength: 1
          type: string
          description: Merchant identifier.
        channel:
          minLength: 1
          type: string
          description: Merchant channel.
        reference:
          type: string
          description: External order reference
        created:
          type: string
          description: Order creation date time
          format: date-time
          readOnly: true
        lastModified:
          type: string
          description: Order last modified date time
          format: date-time
          readOnly: true
        state:
          allOf:
            - $ref: '#/components/schemas/State'
          description: Order state
        culture:
          type: string
          description: Order Culture
        currency:
          type: string
          description: Order Currency
        country:
          type: string
          description: Order Country
        cart:
          allOf:
            - $ref: '#/components/schemas/Cart'
          description: Order cart
        shippings:
          type: array
          items:
            $ref: '#/components/schemas/Shipping'
          description: Shippings related to the order
          readOnly: true
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
          description: Payments related to the order
          readOnly: true
        customer:
          allOf:
            - $ref: '#/components/schemas/Customer'
          description: Customer information
        consents:
          type: array
          items:
            $ref: '#/components/schemas/Consent'
          description: Order consents
        validations:
          type: array
          items:
            $ref: '#/components/schemas/Callback'
          description: >-
            Order actions are called in order to complete an action, such as
            'Validate'. If provided the action is not

            completed if the response is not successful (eg. http status code
            400), note however that in case of a time

            constraint the action might be completed without a successful
            response.
        hooks:
          type: array
          items:
            $ref: '#/components/schemas/Hook'
          description: Hooks, added by a separate endpoint.
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/Notification'
          description: >-
            Order notifications are called after an event has occurred, such as
            order reaching 'Completed' state.
        total:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Order total including shipping fees
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the order.
      additionalProperties: false
    OrderStatus:
      enum:
        - checkout
        - processing
        - accepted
        - completed
        - declined
        - removed
      type: string
    Pagination:
      type: object
      properties:
        offset:
          type: integer
          description: Query offset
          format: int32
          readOnly: true
        limit:
          type: integer
          description: Query limit
          format: int32
          readOnly: true
        size:
          type: integer
          description: Size of Data
          format: int32
          readOnly: true
        totalSize:
          type: integer
          description: Total size of available set
          format: int32
          readOnly: true
      additionalProperties: false
    Payment:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the payment.
          readOnly: true
          example: p_KBiXuYjvYxsezKCQAMuuSKGDaT
        adapterId:
          type: string
          description: Adapter ID
          example: klarna-checkout
        name:
          type: string
          description: Payment service provider name
        merchant:
          type: string
          description: Merchant identifier.
          example: norce
        channel:
          type: string
          description: Merchant channel.
        currency:
          pattern: ^[A-Za-z]{3,3}$
          type: string
          description: Currency of the purchase. ISO 4217.
          example: SEK
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentType'
          description: Type of payment.
          example: default
        orderId:
          type: string
          description: ID of the order.
          example: o_DhZSbDfVzNzuxOzHyCFskzGzaJ
        amount:
          type: number
          description: >-
            The amount to be covered by the payment. Amount in major unit
            currency.
          format: double
          example: 10
        upperLimitAmount:
          type: number
          description: >-
            The upper limit to be used by this payment. For example the amount
            available on a voucher. Amount in major unit

            currency.
          format: double
          example: 100
        state:
          allOf:
            - $ref: '#/components/schemas/PaymentState'
          description: The state of the payment.
          example: Intent
        reference:
          type: string
          description: External reference to payment service provider.
          example: 7d31e2cf-2d46-4db0-b87d-d65dfaae298f
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the payment.
        actions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAction'
          description: After payment actions
      additionalProperties: false
    PaymentAction:
      required:
        - adapterId
        - type
        - url
      type: object
      properties:
        id:
          type: string
          readOnly: true
        adapterId:
          minLength: 1
          type: string
        type:
          minLength: 1
          type: string
        url:
          minLength: 1
          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
          description: Pickup location reference.
        name:
          type: string
          description: Name of pickup location.
        address:
          allOf:
            - $ref: '#/components/schemas/PickupLocationAddress'
          description: Pickup location address.
      additionalProperties: false
    PickupLocationAddress:
      type: object
      properties:
        streetAddress:
          type: string
          description: Address or street name, first line.
          example: Adaptivevägen 18
        city:
          type: string
          description: City.
          example: Boden
        postalCode:
          type: string
          description: Postal code, zip or post code.
          example: 955 60
        country:
          type: string
          description: Country. ISO 3166 alpha-2.
          example: SE
      additionalProperties: false
    Price:
      type: object
      properties:
        includingVat:
          type: number
          description: >-
            Total price including vat in the checkout specified currency. Amount
            in major unit currency.
          format: double
          example: 1234
        excludingVat:
          type: number
          description: >-
            Total price excluding vat in the checkout specified currency. Amount
            in major unit currency.
          format: double
          example: 987.2
      additionalProperties: false
    ProblemDetails:
      required:
        - status
      type: object
      properties:
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem. It may or may not yield further

            information.

            if dereferenced.
          format: uri
        status:
          type: integer
          description: >-
            The HTTP status code generated by the origin server for this
            occurrence of the problem.
          format: int32
        title:
          type: string
          description: >-
            A short, human-readable summary of the problem type. It SHOULD NOT
            change from occurrence to occurrence of the

            problem, except for purposes of localization(e.g., using proactive
            content negotiation; see[RFC7231], Section 3.4).
        type:
          type: string
          description: >-
            A URI reference [RFC3986] that identifies the problem type. This
            specification encourages that, when dereferenced,

            it provide human-readable documentation for the problem type (e.g.,
            using HTML [W3C.REC-html5-20141028]). When this

            member is not present, its value is assumed to be "about:blank".
          format: uri
      additionalProperties: {}
    Product:
      type: object
      properties:
        reference:
          type: string
          description: Product reference.
        name:
          type: string
          description: Carrier product name.
      additionalProperties: false
    Shipping:
      required:
        - total
        - vatRate
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the shipping.
          readOnly: true
          example: s_pmHreuEBboeezpixrHMDPQlazU
        merchant:
          type: string
          description: Merchant identifier.
          example: norce
        channel:
          type: string
          description: Channel identifier
          example: '1'
        state:
          allOf:
            - $ref: '#/components/schemas/ShippingState'
          description: Current state of the shipping.
        reference:
          type: string
          description: External reference to shipping.
          example: e8ed2091-c34c-4837-a3a8-bc827b0dc183
        tmsReference:
          type: string
          description: TMS Reference.
          example: a935a628-f70c-47a4-a9f6-98c6d08c2ba3
        orderId:
          type: string
          description: ID of the order.
          example: o_DhZSbDfVzNzuxOzHyCFskzGzaJ
        adapterId:
          type: string
          description: Adapter ID
          example: ingrid-shipping-adapter
        name:
          type: string
          description: Descriptive name of the shipping.
          example: PostNord MyPack Home
        total:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Total price of the shipping.
        vatRate:
          type: number
          description: Value-added tax. 25% would be input as 0.25.
          format: double
          example: 0.25
        deliveryDetails:
          allOf:
            - $ref: '#/components/schemas/DeliveryDetails'
          description: Delivery details.
        addons:
          type: array
          items:
            $ref: '#/components/schemas/Addon'
          description: Shipping addons.
        attributes:
          type: object
          additionalProperties: {}
          description: Allows you to store any custom attributes for the shipping.
      additionalProperties: false
    ShippingState:
      enum:
        - intent
        - removed
        - processing
        - failed
        - confirmed
      type: string
    State:
      type: object
      properties:
        currentStatus:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
          description: State of the order.
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
          description: State transitions.
          readOnly: true
      additionalProperties: false
    Transition:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
          description: State of the order.
          readOnly: true
        timeStamp:
          type: string
          description: UTC Time when state was set.
          format: date-time
          readOnly: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Authorization header using the bearer scheme. Example: 'Bearer
        a3bcdABCaB12abc3AbCDAB5AbcABCaBcABC5ab3c5A0='
      name: Authorization
      in: header
