> ## Documentation Index
> Fetch the complete documentation index at: https://platform.take.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update order



## OpenAPI

````yaml openapi-v2 PATCH /api/v2/orders/{order_id}
openapi: 3.1.0
info:
  title: Take App Merchant API V2
  version: 2.0.0
  description: >-
    Authenticated Merchant API for stores. All money values are integers in the
    smallest currency unit (e.g. cents).
servers:
  - url: https://take.app
security:
  - bearerAuth: []
paths:
  /api/v2/orders/{order_id}:
    patch:
      tags:
        - Orders
      operationId: updateOrder
      parameters:
        - schema:
            type: string
          required: true
          name: order_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderUpdate'
      responses:
        '200':
          description: Order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderUpdate:
      type: object
      properties:
        order_status:
          type: string
          enum:
            - draft
            - pending
            - confirmed
            - completed
            - cancelled
        payment_status:
          type: string
          enum:
            - pending
            - confirming
            - partial
            - paid
            - refunded
            - voided
        payment_method:
          type: string
        fulfillment_status:
          type: string
          enum:
            - unfulfilled
            - ready
            - in_transit
            - out_for_delivery
            - fulfilled
            - partially_fulfilled
        remark:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
    Order:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - order
        number:
          type: string
        name:
          type: string
        store:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            alias:
              type: string
          required:
            - id
            - name
            - alias
        order_status:
          type: string
          enum:
            - draft
            - pending
            - confirmed
            - completed
            - cancelled
        payment_status:
          type: string
          enum:
            - pending
            - confirming
            - partial
            - paid
            - refunded
            - voided
        payment_method:
          type:
            - string
            - 'null'
        fulfillment_status:
          type: string
          enum:
            - unfulfilled
            - ready
            - in_transit
            - out_for_delivery
            - fulfilled
            - partially_fulfilled
        remark:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
        customer:
          allOf:
            - $ref: '#/components/schemas/Customer'
            - type:
                - object
                - 'null'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem'
        answers:
          type: array
          items:
            $ref: '#/components/schemas/OrderAnswer'
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/OrderDiscount'
        service:
          allOf:
            - $ref: '#/components/schemas/OrderService'
            - type:
                - object
                - 'null'
        schedule:
          allOf:
            - $ref: '#/components/schemas/OrderSchedule'
            - type:
                - object
                - 'null'
        items_quantity:
          type: integer
        items_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        answers_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        discounts_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        service_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        service_charge_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        tip_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        adjustment_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        total_before_tax:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        tax_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        total_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        currency:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - object
        - number
        - name
        - store
        - order_status
        - payment_status
        - payment_method
        - fulfillment_status
        - remark
        - internal_note
        - customer
        - line_items
        - answers
        - discounts
        - service
        - schedule
        - items_quantity
        - items_amount
        - answers_amount
        - discounts_amount
        - service_amount
        - service_charge_amount
        - tip_amount
        - adjustment_amount
        - total_before_tax
        - tax_amount
        - total_amount
        - currency
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - not_found_error
                - rate_limit_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - request_id
      required:
        - error
    Customer:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - customer
        name:
          type: string
        email:
          type:
            - string
            - 'null'
          format: email
        phone:
          type: string
          description: International phone number, digits only, no leading "+".
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
            - type:
                - object
                - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - object
        - name
        - email
        - phone
        - address
        - created_at
        - updated_at
    OrderLineItem:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - order_line_item
        product_id:
          type:
            - string
            - 'null'
        variant_id:
          type:
            - string
            - 'null'
        name:
          type: string
        sku:
          type:
            - string
            - 'null'
        quantity:
          type: integer
        quantity_float:
          type: number
        unit:
          type:
            - string
            - 'null'
        unit_value:
          type:
            - number
            - 'null'
        price:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        total_amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        options:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItemOption'
        image_urls:
          type: array
          items:
            type: string
      required:
        - id
        - object
        - product_id
        - variant_id
        - name
        - sku
        - quantity
        - quantity_float
        - unit
        - unit_value
        - price
        - total_amount
        - options
        - image_urls
    OrderAnswer:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - order_answer
        question_id:
          type:
            - string
            - 'null'
        question_text:
          type: string
        question_type:
          type:
            - string
            - 'null'
          enum:
            - QUESTION_TEXT
            - QUESTION_DATE
            - QUESTION_TIME
            - QUESTION_NOTE
            - QUESTION_IMAGE
            - QUESTION_UPLOAD
            - QUESTION_LOCATION
            - QUESTION_SELECTION
            - QUESTION_CHECKBOX
            - QUESTION_SERVICE
            - null
        answers:
          type: array
          items:
            type: string
        prices:
          type: array
          items:
            type: integer
            description: >-
              Integer amount in the smallest unit of the store currency (e.g.
              cents).
        option_ids:
          type: array
          items:
            type: string
        image_urls:
          type: array
          items:
            type: string
      required:
        - id
        - object
        - question_id
        - question_text
        - question_type
        - answers
        - prices
        - option_ids
        - image_urls
    OrderDiscount:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        amount:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        type:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - amount
        - type
    OrderService:
      type: object
      properties:
        title:
          type: string
        name:
          type: string
        price:
          type: integer
          description: >-
            Integer amount in the smallest unit of the store currency (e.g.
            cents).
        distance:
          type:
            - number
            - 'null'
        distance_unit:
          type:
            - string
            - 'null'
      required:
        - title
        - name
        - price
        - distance
        - distance_unit
    OrderSchedule:
      type: object
      properties:
        date:
          type:
            - string
            - 'null'
          format: date-time
        time:
          type:
            - string
            - 'null'
          format: date-time
        time_end:
          type:
            - string
            - 'null'
          format: date-time
        timezone:
          type:
            - string
            - 'null'
      required:
        - date
        - time
        - time_end
        - timezone
    Address:
      type: object
      properties:
        address1:
          type:
            - string
            - 'null'
        address2:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        zip:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
      required:
        - address1
        - address2
        - city
        - state
        - zip
        - country
        - latitude
        - longitude
    OrderLineItemOption:
      type: object
      properties:
        question_id:
          type:
            - string
            - 'null'
        question_text:
          type: string
        question_type:
          type: string
        answers:
          type: array
          items:
            type: string
        prices:
          type: array
          items:
            type: integer
            description: >-
              Integer amount in the smallest unit of the store currency (e.g.
              cents).
        option_ids:
          type: array
          items:
            type: string
        text:
          type:
            - string
            - 'null'
        image_urls:
          type: array
          items:
            type: string
      required:
        - question_id
        - question_text
        - question_type
        - answers
        - prices
        - option_ids
        - text
        - image_urls
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Merchant API V2 token. Pass as `Authorization: Bearer <token>`.'

````