Commerce Layer notifications API

resource type

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

commerce-layer-notifications-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Commerce Layer addresses notifications API
  version: 7.10.1
  contact:
    name: API Support
    url: https://commercelayer.io
    email: support@commercelayer.io
  description: Headless Commerce for Global Brands.
servers:
- url: https://{your_organization_slug}.commercelayer.io/api
  description: API
- url: https://core.commercelayer.io/users/sign_in
  description: Sign in
- url: https://docs.commercelayer.io/api
  description: API reference
security:
- bearerAuth: []
tags:
- name: notifications
  description: resource type
paths:
  /line_items/{lineItemId}/notifications:
    get:
      operationId: GET/lineItemId/notifications
      summary: Retrieve the notifications associated to the line item
      description: Retrieve the notifications associated to the line item
      tags:
      - notifications
      parameters:
      - name: lineItemId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The notifications associated to the line item
  /notifications:
    get:
      operationId: GET/notifications
      summary: List all notifications
      description: List all notifications
      tags:
      - notifications
      responses:
        '200':
          description: A list of notification objects
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/notificationResponseList'
    post:
      operationId: POST/notifications
      summary: Create a notification
      description: Create a notification
      tags:
      - notifications
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/notificationCreate'
      responses:
        '201':
          description: The created notification object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/notificationResponse'
  /notifications/{notificationId}:
    get:
      operationId: GET/notifications/notificationId
      summary: Retrieve a notification
      description: Retrieve a notification
      tags:
      - notifications
      parameters:
      - name: notificationId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The notification object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/notificationResponse'
    patch:
      operationId: PATCH/notifications/notificationId
      summary: Update a notification
      description: Update a notification
      tags:
      - notifications
      parameters:
      - name: notificationId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/notificationUpdate'
      responses:
        '200':
          description: The updated notification object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/notificationResponse'
    delete:
      operationId: DELETE/notifications/notificationId
      summary: Delete a notification
      description: Delete a notification
      tags:
      - notifications
      parameters:
      - name: notificationId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '204':
          description: No content
  /orders/{orderId}/notifications:
    get:
      operationId: GET/orderId/notifications
      summary: Retrieve the notifications associated to the order
      description: Retrieve the notifications associated to the order
      tags:
      - notifications
      parameters:
      - name: orderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The notifications associated to the order
  /shipping_methods/{shippingMethodId}/notifications:
    get:
      operationId: GET/shippingMethodId/notifications
      summary: Retrieve the notifications associated to the shipping method
      description: Retrieve the notifications associated to the shipping method
      tags:
      - notifications
      parameters:
      - name: shippingMethodId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The notifications associated to the shipping method
components:
  schemas:
    satispayPayment:
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type
              enum:
              - satispay_payments
            attributes:
              type: object
              properties:
                payment_id:
                  type: string
                  description: The payment unique identifier.
                  example: xxxx-yyyy-zzzz
                  nullable: true
                flow:
                  type: string
                  description: The Satispay payment flow, inspect gateway API details for more information.
                  example: MATCH_CODE
                  nullable: true
                status:
                  type: string
                  description: The Satispay payment status.
                  example: PENDING
                  nullable: true
                redirect_url:
                  type: string
                  description: The url to redirect the customer after the payment flow is completed.
                  example: http://commercelayer.dev/satispay/redirect
                  nullable: true
                payment_url:
                  type: string
                  description: Redirect url to the payment page.
                  example: https://online.satispay.com/pay/xxxx-yyyy-zzzz?redirect_url={redirect_url}
                  nullable: true
                payment_response:
                  type: object
                  description: The Satispay payment response, used to fetch internal data.
                  example:
                    foo: bar
                  nullable: true
                payment_instrument:
                  type: object
                  description: Information about the payment instrument used in the transaction.
                  example:
                    issuer: cl bank
                    card_type: visa
                  nullable: true
                created_at:
                  type: string
                  description: Time at which the resource was created.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                updated_at:
                  type: string
                  description: Time at which the resource was last updated.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                reference:
                  type: string
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                  nullable: true
                reference_origin:
                  type: string
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                  nullable: true
                metadata:
                  type: object
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
                  nullable: true
            relationships:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - orders
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                payment_gateway:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - payment_gateways
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                event_stores:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - event_stores
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
    notification:
      properties:
        data:
          properties:
            attributes:
              type: object
              properties:
                name:
                  type: string
                  description: The internal name of the notification.
                  example: DDT transport document
                  nullable: false
                flash:
                  type: boolean
                  description: Indicates if the notification is temporary, valid for the ones created by external services.
                  example: false
                  nullable: true
                body:
                  type: object
                  description: An internal body of the notification.
                  example:
                    sku: REDHANDBAG
                    name: Enjoy your free item
                  nullable: true
                created_at:
                  type: string
                  description: Time at which the resource was created.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                updated_at:
                  type: string
                  description: Time at which the resource was last updated.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                reference:
                  type: string
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                  nullable: true
                reference_origin:
                  type: string
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                  nullable: true
                metadata:
                  type: object
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
                  nullable: true
    notificationResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier for the resource (hash).
              example: XAyRWNUzyN
            type:
              type: string
              description: The resource's type
              enum:
              - notifications
            links:
              type: object
              properties:
                self:
                  type: string
                  description: URL
            attributes:
              $ref: '#/components/schemas/notification/properties/data/properties/attributes'
            relationships:
              type: object
              properties:
                notifiable:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - notifiable
                        id:
                          type: string
                          description: The resource ID
                event_stores:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - event_stores
                        id:
                          type: string
                          description: The resource ID
    wireTransfer:
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type
              enum:
              - wire_transfers
            attributes:
              type: object
              properties:
                payment_instrument:
                  type: object
                  description: Information about the payment instrument used in the transaction.
                  example:
                    issuer: cl bank
                    card_type: visa
                  nullable: true
                created_at:
                  type: string
                  description: Time at which the resource was created.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                updated_at:
                  type: string
                  description: Time at which the resource was last updated.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                reference:
                  type: string
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                  nullable: true
                reference_origin:
                  type: string
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                  nullable: true
                metadata:
                  type: object
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
                  nullable: true
            relationships:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - orders
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                event_stores:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - event_stores
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
    capture:
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type
              enum:
              - captures
            attributes:
              type: object
              properties:
                number:
                  type: string
                  description: The transaction number, auto generated.
                  example: 42/T/001
                  nullable: false
                type:
                  type: string
                  description: The transaction's type.
                  example: authorizations
                  nullable: false
                  enum:
                  - authorizations
                  - voids
                  - captures
                  - refunds
                payment_method_type:
                  type: string
                  description: Information about the payment method used in the transaction.
                  example: credit card
                  nullable: true
                currency_code:
                  type: string
                  description: The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.
                  example: EUR
                  nullable: false
                amount_cents:
                  type: integer
                  description: The transaction amount, in cents.
                  example: 1500
                  nullable: false
                amount_float:
                  type: number
                  description: The transaction amount, float.
                  example: 15.0
                  nullable: false
                formatted_amount:
                  type: string
                  description: The transaction amount, formatted.
                  example: €15,00
                  nullable: false
                succeeded:
                  type: boolean
                  description: Indicates if the transaction is successful.
                  example: false
                  nullable: false
                message:
                  type: string
                  description: The message returned by the payment gateway.
                  example: Accepted
                  nullable: true
                error_code:
                  type: string
                  description: The error code, if any, returned by the payment gateway.
                  example: '00001'
                  nullable: true
                error_detail:
                  type: string
                  description: The error detail, if any, returned by the payment gateway.
                  example: Already settled
                  nullable: true
                token:
                  type: string
                  description: The token identifying the transaction, returned by the payment gateway.
                  example: xxxx-yyyy-zzzz
                  nullable: true
                gateway_transaction_id:
                  type: string
                  description: The ID identifying the transaction, returned by the payment gateway.
                  example: xxxx-yyyy-zzzz
                  nullable: true
                created_at:
                  type: string
                  description: Time at which the resource was created.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                updated_at:
                  type: string
                  description: Time at which the resource was last updated.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: false
                reference:
                  type: string
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                  nullable: true
                reference_origin:
                  type: string
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                  nullable: true
                metadata:
                  type: object
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
                  nullable: true
                refund_amount_cents:
                  type: integer
                  description: The amount to be refunded, in cents.
                  example: 500
                  nullable: true
                refund_amount_float:
                  type: number
                  description: The amount to be refunded, float.
                  example: 5.0
                  nullable: true
                formatted_refund_amount:
                  type: string
                  description: The amount to be refunded, formatted.
                  example: €5,00
                  nullable: true
                refund_balance_cents:
                  type: integer
                  description: The balance to be refunded, in cents.
                  example: 1000
                  nullable: true
                refund_balance_float:
                  type: number
                  description: The balance to be refunded, float.
                  example: 10.0
                  nullable: true
                formatted_refund_balance:
                  type: string
                  description: The balance to be refunded, formatted.
                  example: €10,00
                  nullable: true
            relationships:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - orders
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                payment_source:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - adyen_payments
                          - axerve_payments
                          - braintree_payments
                          - checkout_com_payments
                          - external_payments
                          - klarna_payments
                          - paypal_payments
                          - satispay_payments
                          - stripe_payments
                          - wire_transfers
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                  oneOf:
                  - $ref: '#/components/schemas/adyenPayment'
                  - $ref: '#/components/schemas/axervePayment'
                  - $ref: '#/components/schemas/braintreePayment'
                  - $ref: '#/components/schemas/checkoutComPayment'
                  - $ref: '#/components/schemas/externalPayment'
                  - $ref: '#/components/schemas/klarnaPayment'
                  - $ref: '#/components/schemas/paypalPayment'
                  - $ref: '#/components/schemas/satispayPayment'
                  - $ref: '#/components/schemas/stripePayment'
                  - $ref: '#/components/schemas/wireTransfer'
                attachments:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - attachments
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                events:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - events
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                event_stores:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - event_stores
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                reference_authorization:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - authorizations
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                refunds:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - refunds
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
                return:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - returns
                        id:
                          type: string
                          description: Unique identifier for the resource (hash).
                          example: XAyRWNUzyN
    order:
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type
              enum:
              - orders
            attributes:
              type: object
              properties:
                number:
                  type: string
                  description: The order identifier. Can be specified if unique within the organization (for enterprise plans only), default to numeric ID otherwise. Cannot be passed by sales channels.
                  example: '1234'
                  nullable: true
                affiliate_code:
                  type: string
                  description: The affiliate code, if any, to track commissions using any third party services.
                  example: xxxx-yyyy-zzzz
                  nullable: true
                autorefresh:
                  type: boolean
                  description: Save this attribute as 'false' if you want prevent the order to be refreshed automatically at each change (much faster).
                  example: true
                  nullable: true
                place_async:
                  type: boolean
                  description: Save this attribute as 'true' if you want perform the place asynchronously. Payment errors, if any, will be collected afterwards.
                  example: true
                  nullable: true
                status:
                  type: string
                  description: The order status. One of 'draft' (default), 'pending', 'editing', 'placing', 'placed', 'approved', or 'cancelled'.
                  example: draft
                  nullable: false
                  enum:
                  - draft
                  - pending
                  - editing
                  - placing
                  - placed
                  - approved
                  - cancelled
                payment_status:
                  type: string
                  description: The order payment status. One of 'unpaid' (default), 'authorized', 'partially_authorized', 'paid', 'partially_paid', 'voided', 'partially_voided', 'refunded', 'partially_refunded', or 'free'.
                  example: unpaid
                  nullable: false
                  enum:
                  - unpaid
                  - authorized
                  - partially_authorized
                  - paid
                  - partially_paid
                  - voided
                  - partially_voided
                  - refunded
                  - partially_refunded
                  - free
                fulfillment_status:
           

# --- truncated at 32 KB (379 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/commerce-layer/refs/heads/main/openapi/commerce-layer-notifications-api-openapi.yml