Commerce Layer order_factories API

resource type

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

commerce-layer-order-factories-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Commerce Layer addresses order_factories 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: order_factories
  description: resource type
paths:
  /order_factories:
    get:
      operationId: GET/order_factories
      summary: List all order factories
      description: List all order factories
      tags:
      - order_factories
      responses:
        '200':
          description: A list of order factory objects
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/orderFactoryResponseList'
  /order_factories/{orderFactoryId}:
    get:
      operationId: GET/order_factories/orderFactoryId
      summary: Retrieve an order factory
      description: Retrieve an order factory
      tags:
      - order_factories
      parameters:
      - name: orderFactoryId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The order factory object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/orderFactoryResponse'
  /order_subscriptions/{orderSubscriptionId}/order_factories:
    get:
      operationId: GET/orderSubscriptionId/order_factories
      summary: Retrieve the order factories associated to the order subscription
      description: Retrieve the order factories associated to the order subscription
      tags:
      - order_factories
      parameters:
      - name: orderSubscriptionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The order_factories associated to the order subscription
  /orders/{orderId}/order_factories:
    get:
      operationId: GET/orderId/order_factories
      summary: Retrieve the order factories associated to the order
      description: Retrieve the order factories associated to the order
      tags:
      - order_factories
      parameters:
      - name: orderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The order_factories associated to the order
components:
  schemas:
    orderFactory:
      properties:
        data:
          properties:
            attributes:
              type: object
              properties:
                type:
                  type: string
                  description: The order factory's type.
                  example: recurring_order_copies
                  nullable: false
                  enum:
                  - order_copies
                  - recurring_order_copies
                status:
                  type: string
                  description: The order factory status. One of 'pending' (default), 'in_progress', 'aborted', 'failed', or 'completed'.
                  example: in_progress
                  nullable: false
                  enum:
                  - pending
                  - in_progress
                  - aborted
                  - failed
                  - completed
                started_at:
                  type: string
                  description: Time at which the order copy was started.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: true
                completed_at:
                  type: string
                  description: Time at which the order copy was completed.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: true
                failed_at:
                  type: string
                  description: Time at which the order copy has failed.
                  example: '2018-01-01T12:00:00.000Z'
                  nullable: true
                errors_log:
                  type: object
                  description: Contains the order copy errors, if any.
                  example:
                    status:
                    - cannot transition from draft to placed
                  nullable: true
                errors_count:
                  type: integer
                  description: Indicates the number of copy errors, if any.
                  example: 2
                  nullable: true
                place_target_order:
                  type: boolean
                  description: Indicates if the target order must be placed upon copy.
                  example: true
                  nullable: true
                reuse_wallet:
                  type: boolean
                  description: Indicates if the payment source within the source order customer's wallet must be copied.
                  example: true
                  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
    orderFactoryResponseList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/orderFactoryResponse/properties/data'
    orderFactoryResponse:
      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:
              - order_factories
            links:
              type: object
              properties:
                self:
                  type: string
                  description: URL
            attributes:
              $ref: '#/components/schemas/orderFactory/properties/data/properties/attributes'
            relationships:
              type: object
              properties:
                source_order:
                  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:
                          - source_order
                        id:
                          type: string
                          description: The resource ID
                target_order:
                  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:
                          - target_order
                        id:
                          type: string
                          description: The resource ID
                events:
                  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:
                          - events
                        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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT