Shopify Admin API Orders API

The Orders API from Shopify Admin API — 3 operation(s) for orders.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

shopify-admin-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Shopify Admin REST Collections Orders API
  description: 'The Shopify Admin REST API lets you build apps and integrations that extend and enhance the Shopify admin. It provides access to products, customers, orders, inventory, fulfillment, shipping, and store configuration. All requests require a valid Shopify access token. Note: Shopify is deprecating the REST Admin API in favor of GraphQL. New development should use the GraphQL Admin API.'
  version: 2024-10
  termsOfService: https://www.shopify.com/legal/api-terms
  contact:
    name: Shopify Developer Support
    url: https://shopify.dev/docs/api/admin-rest
  license:
    name: API Terms of Service
    url: https://www.shopify.com/legal/api-terms
servers:
- url: https://{store_name}.myshopify.com/admin/api/2024-10
  description: Shopify Admin REST API
  variables:
    store_name:
      description: The name of the Shopify store
      default: mystore
security:
- AccessToken: []
tags:
- name: Orders
paths:
  /orders.json:
    get:
      operationId: listOrders
      summary: List Orders
      description: Retrieves a list of orders from the store.
      tags:
      - Orders
      parameters:
      - name: limit
        in: query
        description: The maximum number of results to show
        schema:
          type: integer
          minimum: 1
          maximum: 250
          default: 50
      - name: status
        in: query
        description: Filter orders by status
        schema:
          type: string
          enum:
          - open
          - closed
          - cancelled
          - any
      - name: financial_status
        in: query
        description: Filter orders by financial status
        schema:
          type: string
          enum:
          - authorized
          - paid
          - partially_paid
          - partially_refunded
          - pending
          - refunded
          - unpaid
          - voided
          - any
      - name: fulfillment_status
        in: query
        description: Filter orders by fulfillment status
        schema:
          type: string
          enum:
          - fulfilled
          - null
          - partial
          - restocked
          - unfulfilled
          - any
      responses:
        '200':
          description: Successful response with list of orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
  /orders/{order_id}.json:
    get:
      operationId: getOrder
      summary: Get Order
      description: Retrieves a single order by ID.
      tags:
      - Orders
      parameters:
      - name: order_id
        in: path
        required: true
        description: The ID of the order
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Order details
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/Order'
    put:
      operationId: updateOrder
      summary: Update Order
      description: Updates an existing order.
      tags:
      - Orders
      parameters:
      - name: order_id
        in: path
        required: true
        description: The ID of the order
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    note:
                      type: string
                    tags:
                      type: string
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/Order'
  /orders/{order_id}/cancel.json:
    post:
      operationId: cancelOrder
      summary: Cancel Order
      description: Cancels an order.
      tags:
      - Orders
      parameters:
      - name: order_id
        in: path
        required: true
        description: The ID of the order to cancel
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  enum:
                  - customer
                  - fraud
                  - inventory
                  - declined
                  - other
                email:
                  type: boolean
      responses:
        '200':
          description: Order cancelled successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/Order'
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: integer
          format: int64
        email:
          type: string
          format: email
        first_name:
          type: string
        last_name:
          type: string
        phone:
          type: string
        verified_email:
          type: boolean
        accepts_marketing:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        orders_count:
          type: integer
        total_spent:
          type: string
        note:
          type: string
          nullable: true
        tags:
          type: string
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        default_address:
          $ref: '#/components/schemas/Address'
    Order:
      type: object
      properties:
        id:
          type: integer
          format: int64
        order_number:
          type: integer
        email:
          type: string
          format: email
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        total_price:
          type: string
        subtotal_price:
          type: string
        total_tax:
          type: string
        currency:
          type: string
        financial_status:
          type: string
          enum:
          - authorized
          - paid
          - partially_paid
          - partially_refunded
          - pending
          - refunded
          - unpaid
          - voided
        fulfillment_status:
          type: string
          nullable: true
          enum:
          - fulfilled
          - null
          - partial
          - restocked
        status:
          type: string
          enum:
          - open
          - closed
          - cancelled
        note:
          type: string
          nullable: true
        tags:
          type: string
        customer:
          $ref: '#/components/schemas/Customer'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        shipping_address:
          $ref: '#/components/schemas/Address'
        billing_address:
          $ref: '#/components/schemas/Address'
    LineItem:
      type: object
      properties:
        id:
          type: integer
          format: int64
        product_id:
          type: integer
          format: int64
        variant_id:
          type: integer
          format: int64
        title:
          type: string
        quantity:
          type: integer
        price:
          type: string
        sku:
          type: string
        vendor:
          type: string
        requires_shipping:
          type: boolean
        taxable:
          type: boolean
    Address:
      type: object
      properties:
        id:
          type: integer
          format: int64
        customer_id:
          type: integer
          format: int64
        first_name:
          type: string
        last_name:
          type: string
        company:
          type: string
          nullable: true
        address1:
          type: string
        address2:
          type: string
          nullable: true
        city:
          type: string
        province:
          type: string
        country:
          type: string
        zip:
          type: string
        phone:
          type: string
          nullable: true
        default:
          type: boolean
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: X-Shopify-Access-Token
      description: Shopify access token for authentication