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

# Update a buying group order

> Changes only the fields you send.



## OpenAPI

````yaml /api-reference/openapi.json patch /buying-group-orders/{id}
openapi: 3.1.0
info:
  title: Churning Tracker API
  version: 1.0.0
  description: Read and write your buying group orders, gift card orders, and shipments.
servers:
  - url: https://app.churningtracker.com/api/v1
security:
  - apiKey: []
    apiSecret: []
tags:
  - name: Buying group orders
  - name: Gift card orders
  - name: Shipments
  - name: Credit cards
paths:
  /buying-group-orders/{id}:
    patch:
      tags:
        - Buying group orders
      summary: Update a buying group order
      description: Changes only the fields you send.
      operationId: update-buying-group-orders
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBuyingGroupOrder'
            example:
              status: received
              notes: Received at warehouse
      responses:
        '200':
          description: The updated order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BuyingGroupOrder'
        '400':
          description: Invalid body, or amounts changed on an order entered as no purchase.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Your plan doesn't include API access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Order or line item not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Another order already uses this order number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateBuyingGroupOrder:
      type: object
      additionalProperties: false
      description: Send only the fields to change. `null` clears a nullable field.
      properties:
        orderDate:
          type: string
          format: date
          description: '`YYYY-MM-DD`.'
          example: '2026-10-01'
        orderTime:
          type:
            - string
            - 'null'
          description: '`HH:mm` or `HH:mm:ss`, in your local time.'
          example: '14:30'
        retailer:
          type: string
          description: Store name, such as `Best Buy`.
          example: Best Buy
        orderNumber:
          type: string
          maxLength: 100
          description: Must be unique across your orders. Surrounding spaces are trimmed.
          example: BBY01-123456
        shipping:
          type: integer
          minimum: 0
          description: Shipping in cents.
          default: 0
        tax:
          type: integer
          minimum: 0
          description: Tax in cents.
          default: 0
          example: 4800
        discount:
          type: integer
          minimum: 0
          description: Discount in cents.
          default: 0
        creditCardId:
          type:
            - string
            - 'null'
          description: >-
            ID of one of your credit cards, from [List credit
            cards](/api-reference/credit-cards/list-credit-cards).
        subCreditCardId:
          type:
            - string
            - 'null'
          description: ID of one of that card's `subCards`.
        cardEarnRate:
          type: number
          minimum: 0
          default: 0
          description: >-
            Points or cashback multiplier, e.g. `2` for 2x or `1.5` for 1.5x. Up
            to three decimal places; more are rounded.
        retailerAccount:
          type:
            - string
            - 'null'
          maxLength: 100
          description: The retailer account the order was placed with, such as its email.
        notes:
          type:
            - string
            - 'null'
          maxLength: 1000
        redemptionCodes:
          type: array
          maxItems: 50
          description: >-
            Gift card codes, vouchers, or credits for the order. Write-only:
            responses don't include them. Your plan's per-order limit applies.
          items:
            $ref: '#/components/schemas/RedemptionCode'
        buyingGroup:
          type: string
          maxLength: 100
          description: >-
            Buying group ID, e.g. `bfmr`. See [buying group
            IDs](/api-reference/introduction#buying-group-ids).
          example: bfmr
        status:
          type: string
          enum:
            - purchased
            - shipped
            - partially_delivered
            - delivered
            - partially_received
            - received
            - partially_paid
            - issue
            - paid
            - cancelled
          example: purchased
        orderLineItems:
          type: array
          minItems: 1
          maxItems: 10
          description: >-
            Replaces the whole list and recalculates the subtotal. An item with
            an `id` updates that line item, keeping fields you omit. An item
            without an `id` is new and needs every required field. Line items
            left out are removed.
          items:
            type: object
            additionalProperties: false
            properties:
              id:
                type: string
                description: ID of an existing line item on this order.
              description:
                type: string
                maxLength: 200
                description: What was bought.
                example: iPad Air
              model:
                type: string
                maxLength: 100
                description: Model or SKU.
                example: MV273LL/A
              unitPrice:
                type: integer
                minimum: 0
                description: Price paid per unit in cents.
                example: 59999
              quantity:
                type: integer
                minimum: 1
                example: 2
              expectedUnitPayout:
                type: integer
                minimum: 0
                description: >-
                  Payout you expect per unit. On buying group orders, if you
                  leave it out, Churning Tracker fills it in from current deals
                  when it can; otherwise it's 0 in cents.
                example: 62000
    BuyingGroupOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source:
          type: string
          enum:
            - dashboard
            - extension
            - csv_import
            - api
            - email_automation
          description: How the order was created.
        orderDate:
          type: string
          format: date
        orderTime:
          type:
            - string
            - 'null'
          example: '14:30:00'
        retailer:
          type: string
        orderNumber:
          type:
            - string
            - 'null'
        retailerAccount:
          type:
            - string
            - 'null'
        subtotal:
          type: integer
          minimum: 0
          description: Sum of line items in cents.
        shipping:
          type: integer
          minimum: 0
          description: Shipping in cents.
        tax:
          type: integer
          minimum: 0
          description: Tax in cents.
        discount:
          type: integer
          minimum: 0
          description: Discount in cents.
        total:
          type: integer
          minimum: 0
          description: Subtotal plus shipping and tax, minus discount in cents.
        creditCardId:
          type:
            - string
            - 'null'
        subCreditCardId:
          type:
            - string
            - 'null'
        cardEarnRate:
          type: number
          description: >-
            Points or cashback multiplier, e.g. `2` for 2x or `1.5` for 1.5x. Up
            to three decimal places.
        notes:
          type:
            - string
            - 'null'
        cashback:
          oneOf:
            - $ref: '#/components/schemas/Cashback'
            - type: 'null'
          description: Cashback stacked on the order, e.g. from a shopping portal.
        createdAt:
          type: string
          format: date-time
        expectedPayout:
          type: integer
          minimum: 0
          description: Sum of the line items' expected payouts in cents.
        buyingGroup:
          type: string
          maxLength: 100
          description: >-
            Buying group ID, e.g. `bfmr`. See [buying group
            IDs](/api-reference/introduction#buying-group-ids).
          example: bfmr
        status:
          type: string
          enum:
            - purchased
            - shipped
            - partially_delivered
            - delivered
            - partially_received
            - received
            - partially_paid
            - issue
            - paid
            - cancelled
          example: purchased
        trackingNumbers:
          type: array
          items:
            $ref: '#/components/schemas/TrackingNumber'
          description: >-
            Added through [Add
            shipments](/api-reference/shipments/add-shipments).
        orderLineItems:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
      required:
        - id
        - source
        - orderDate
        - orderTime
        - retailer
        - orderNumber
        - retailerAccount
        - subtotal
        - shipping
        - tax
        - discount
        - total
        - creditCardId
        - subCreditCardId
        - cardEarnRate
        - notes
        - cashback
        - createdAt
        - expectedPayout
        - buyingGroup
        - status
        - trackingNumbers
        - orderLineItems
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
            issues:
              type: array
              description: Per-field problems, when there are any.
              items:
                type: object
                properties:
                  path:
                    type: string
                    example: orderLineItems.0.unitPrice
                  message:
                    type: string
    RedemptionCode:
      type: object
      additionalProperties: false
      required:
        - code
      properties:
        code:
          type: string
          maxLength: 50
        pin:
          type: string
          maxLength: 20
        notes:
          type: string
          maxLength: 200
        kind:
          type: string
          enum:
            - gift_card
            - voucher
            - credit
            - other
        brand:
          type: string
          maxLength: 100
        purpose:
          type: string
          maxLength: 100
        value:
          type: number
          minimum: 0
          description: >-
            Value of the code in **dollars**. Unlike every other money field,
            this one isn't in cents.
    Cashback:
      type: object
      properties:
        platform:
          type: string
        status:
          type: string
        rewardType:
          type: string
          enum:
            - cashback
            - points_miles
        rewardAmount:
          type:
            - number
            - 'null'
          description: >-
            Cents for `cashback`, or points or miles for `points_miles`. Null
            until entered.
    TrackingNumber:
      type: object
      properties:
        trackingNumber:
          type: string
        carrier:
          type: string
          enum:
            - usps
            - ups
            - fedex
            - amazon
            - doordash
            - ontrac
            - lasership
            - unknown
        itemCount:
          type:
            - integer
            - 'null'
    LineItem:
      type: object
      properties:
        id:
          type: string
        description:
          type:
            - string
            - 'null'
        model:
          type:
            - string
            - 'null'
        unitPrice:
          type: integer
          minimum: 0
          description: Price per unit in cents.
        quantity:
          type: integer
        expectedUnitPayout:
          type: integer
          minimum: 0
          description: Expected payout per unit in cents.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your API key, starting with `ct_key_`.
    apiSecret:
      type: apiKey
      in: header
      name: x-api-secret
      description: Your API secret, starting with `ct_secret_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.