Opply App Orders API
The App Orders API from Opply — 126 operation(s) for app orders.
The App Orders API from Opply — 126 operation(s) for app orders.
openapi: 3.0.3
info:
title: Opply Activity Feed App Orders API
version: 0.0.0
tags:
- name: App Orders
paths:
/api/v1/app-orders/admin/:
get:
operationId: api_v1_app_orders_admin_list
summary: App Orders admin endpoints
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedAdminAppOrderListList'
description: ''
/api/v1/app-orders/admin/{uuid}/:
get:
operationId: api_v1_app_orders_admin_retrieve
summary: App Orders admin endpoints
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDetails'
description: ''
/api/v1/app-orders/admin/{uuid}/create-order-event/:
post:
operationId: api_v1_app_orders_admin_create_order_event_create
summary: Endpoint to add order event for app order
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderEventCreate'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AdminAppOrderEventCreate'
multipart/form-data:
schema:
$ref: '#/components/schemas/AdminAppOrderEventCreate'
security:
- tokenAuth: []
- cookieAuth: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderEvent'
description: ''
/api/v1/app-orders/admin/{uuid}/documents/:
get:
operationId: api_v1_app_orders_admin_documents_list
summary: Endpoint to list documents for an app order
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedAdminAppOrderDocumentList'
description: ''
/api/v1/app-orders/admin/{uuid}/documents/{document_uuid}/:
delete:
operationId: api_v1_app_orders_admin_documents_destroy
summary: Endpoint to delete a specific document
parameters:
- in: path
name: document_uuid
schema:
type: string
required: true
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'204':
description: No response body
/api/v1/app-orders/admin/{uuid}/edit/:
put:
operationId: api_v1_app_orders_admin_edit_update
summary: Endpoint to edit order prices for supplier
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderUpdate'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AdminAppOrderUpdate'
multipart/form-data:
schema:
$ref: '#/components/schemas/AdminAppOrderUpdate'
required: true
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDetails'
description: ''
/api/v1/app-orders/admin/{uuid}/mark-order-as-paid/:
post:
operationId: api_v1_app_orders_admin_mark_order_as_paid_create
summary: Endpoint to mark order as paid
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDetails'
description: ''
'400':
description: Stripe invoice is voided. Recreate the invoice before marking as paid.
'500':
description: An error occurred while marking the Stripe invoice as paid.
/api/v1/app-orders/admin/{uuid}/mark-order-as-paid-out-to-supplier/:
post:
operationId: api_v1_app_orders_admin_mark_order_as_paid_out_to_supplier_create
summary: Endpoint to mark order as paid out to supplier
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDetails'
description: ''
/api/v1/app-orders/admin/{uuid}/order-events/:
get:
operationId: api_v1_app_orders_admin_order_events_list
summary: Endpoint to get order events
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedAdminAppOrderEventList'
description: ''
/api/v1/app-orders/admin/{uuid}/pricing/:
get:
operationId: api_v1_app_orders_admin_pricing_retrieve
summary: Endpoint to get order prices for Buyer
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderPrice'
description: ''
/api/v1/app-orders/admin/{uuid}/upload-document/:
post:
operationId: api_v1_app_orders_admin_upload_document_create
summary: Endpoint to upload a document for an app order
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDocument'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AdminAppOrderDocument'
multipart/form-data:
schema:
$ref: '#/components/schemas/AdminAppOrderDocument'
required: true
security:
- tokenAuth: []
- cookieAuth: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AdminAppOrderDocument'
description: ''
/api/v1/app-orders/brand/:
get:
operationId: api_v1_app_orders_brand_list
description: Get a paginated list of all orders for the authenticated buyer company.
summary: List all buyer orders
parameters:
- in: query
name: delivery_date_from
schema:
type: string
format: date
description: 'Filter by estimated delivery date from (inclusive, format: YYYY-MM-DD)'
- in: query
name: delivery_date_to
schema:
type: string
format: date
description: 'Filter by estimated delivery date to (inclusive, format: YYYY-MM-DD)'
- in: query
name: delivery_state
schema:
type: string
description: Filter by delivery state (e.g. 'delivered', 'in_transit', 'pending_dispatch'). Used by the Delivery Timeline view to fetch only completed orders for the lazy ✓ delivered section.
- in: query
name: delivery_status_group
schema:
type: string
description: 'Filter by delivery status group: not_started, arranging_freight, pending_dispatch, ready, in_transit, delivered, payment_needed'
- in: query
name: exclude_delivery_state
schema:
type: string
description: Exclude orders with this delivery state. Used by the Delivery Timeline view to fetch active (non-delivered) orders only.
- in: query
name: exclude_legacy
schema:
type: boolean
description: When true, exclude orders linked to the legacy orders system (rows where legacy_order is set).
- in: query
name: lifecycle_state
schema:
type: string
description: Filter by lifecycle state (e.g. 'confirmed', 'forecasted', 'pending_merchant_of_record_approval')
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- in: query
name: payment_status
schema:
type: string
description: Filter by payment status (not_started, due, overdue, paid)
- in: query
name: search
schema:
type: string
description: Search across PO number, customer reference, supplier name, products, and delivery address fields
- in: query
name: supplier
schema:
type: string
format: uuid
description: Filter by supplier company UUID
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedBuyerAppOrderListList'
description: ''
/api/v1/app-orders/brand/{uuid}/:
get:
operationId: api_v1_app_orders_brand_retrieve
summary: Brand endpoints for App Orders
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerAppOrderDetails'
description: ''
/api/v1/app-orders/brand/{uuid}/client-notified-as-paid/:
post:
operationId: api_v1_app_orders_brand_client_notified_as_paid_create
description: 'Buyer notifies that payment has been made.
- **direct**: Marks both pay_in_state and payout_state as PAID.
- **other providers**: Transitions pay_in_state to AWAITING_RECONCILIATION.
Optionally accepts a `file_name` field to attach a proof of payment document.'
summary: Buyer notifies order as paid
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerClientNotifiedAsPaid'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BuyerClientNotifiedAsPaid'
multipart/form-data:
schema:
$ref: '#/components/schemas/BuyerClientNotifiedAsPaid'
security:
- tokenAuth: []
- cookieAuth: []
responses:
'204':
description: Order payment status updated
'400':
description: Invalid state transition
/api/v1/app-orders/brand/{uuid}/invoice-url/:
get:
operationId: api_v1_app_orders_brand_invoice_url_retrieve
description: 'Returns invoice based on payment provider:
- **Stripe**: Returns JSON `{"url": "https://..."}`
- **Two**: Returns PDF file directly with Content-Type: application/pdf
- **Direct**: Returns JSON `{"url": "https://..."}` with supplier invoice document URL
'
summary: Returns the invoice URL or PDF
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
description: Invoice PDF (Two orders) or JSON with URL (Stripe/Direct orders)
'400':
description: Error retrieving invoice from payment provider
'404':
description: Invoice missing when it should exist or access denied
/api/v1/app-orders/brand/{uuid}/mark-as-delivered/:
post:
operationId: api_v1_app_orders_brand_mark_as_delivered_create
description: 'Buyer-driven transition: confirm an order as delivered.'
summary: Buyer mark an order as delivered
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
description: Order has been marked as delivered
'400':
description: Error while marking an order as delivered
/api/v1/app-orders/brand/{uuid}/mark-as-picked-up/:
post:
operationId: api_v1_app_orders_brand_mark_as_picked_up_create
description: 'Buyer-driven transition: confirm an order as picked up, recording dispatched_at + tracking info.'
summary: Mark order as picked up (buyer path)
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerMarkAsPickedUp'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BuyerMarkAsPickedUp'
multipart/form-data:
schema:
$ref: '#/components/schemas/BuyerMarkAsPickedUp'
required: true
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
description: Order marked as picked up
'400':
description: Cannot transition order to this state
/api/v1/app-orders/brand/{uuid}/order-activities/:
get:
operationId: api_v1_app_orders_brand_order_activities_list
description: Returns a list of all order activities for the specified order.
summary: List order activities
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedBuyerOrderActivityList'
description: ''
/api/v1/app-orders/brand/{uuid}/purchase-order/pdf/:
get:
operationId: api_v1_app_orders_brand_purchase_order_pdf_retrieve
description: Generate the buyer-facing purchase-order PDF for this order and return its signed URL.
summary: Generate and retrieve the purchase order PDF for an App Order
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PDFUrl'
description: ''
/api/v1/app-orders/brand/{uuid}/repeat-spot-order/:
post:
operationId: api_v1_app_orders_brand_repeat_spot_order_create
description: Creates a new spot order with the same data as the original order but with fresh states and unique identifiers. This includes duplicating all order documents and line item documents.
summary: Repeat an app spot order
parameters:
- in: path
name: uuid
schema:
type: string
required: true
tags:
- App Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerRepeatSpotOrderRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BuyerRepeatSpotOrderRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/BuyerRepeatSpotOrderRequest'
required: true
security:
- tokenAuth: []
- cookieAuth: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerRepeatSpotOrderResponse'
description: ''
'400':
description: Error repeating order
'403':
description: User is not authorized to repeat this order
'404':
description: Order not found or cannot be repeated
/api/v1/app-orders/brand/activity-statement/:
get:
operationId: api_v1_app_orders_brand_activity_statement_retrieve
description: 'Activity statement for the buyer: their orders grouped by currency, each with the invoiced total, current payment status, and a server-computed cumulative outstanding balance per entry plus opening / closing balances. Outstanding is the same figure the finance / statements pages use, so the closing balance reconciles. Optionally bound the window with `date_from` / `date_to` (YYYY-MM-DD, inclusive); orders placed before `date_from` fold their outstanding into the opening balance. All monetary values are in cents.'
summary: Buyer activity statement with running outstanding balance
parameters:
- in: query
name: date_from
schema:
type: string
format: date
description: Include orders placed on or after this date (YYYY-MM-DD). Earlier orders fold their outstanding into the opening balance.
- in: query
name: date_to
schema:
type: string
format: date
description: Include activity on or before this date (YYYY-MM-DD).
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerActivityStatement'
description: ''
/api/v1/app-orders/brand/aggregate/:
get:
operationId: api_v1_app_orders_brand_aggregate_retrieve
description: Returns a per-currency aggregate (sum / avg / min / max) of `total_in_buyer_currency` over the filtered orders, computed in full-precision Decimal micro-units and rounded to integer cents once per currency. Use this for cross-order sum/total/average questions — the per-order totals returned by `list` are individually rounded and accrue visible rounding error when added in prose (SC-3627). Filters mirror the `list` endpoint exactly. Alternatively pass `order_uuids` (repeated query param) to aggregate over an explicit set of order UUIDs — the filters are ignored when uuids are present. Every UUID must resolve inside the caller's scope or the whole call is rejected with a 403.
summary: Aggregate order totals across the filtered set in full precision
parameters:
- in: query
name: agreement_uuid
schema:
type: string
format: uuid
description: Agreement (contract) UUID.
- in: query
name: delivery_date_from
schema:
type: string
format: date
description: Estimated delivery on/after this date (YYYY-MM-DD).
- in: query
name: delivery_date_to
schema:
type: string
format: date
description: Estimated delivery on/before this date (YYYY-MM-DD).
- in: query
name: delivery_state
schema:
type: string
description: Filter by exact delivery state.
- in: query
name: delivery_status_group
schema:
type: string
description: Filter by coarse delivery status group.
- in: query
name: exclude_delivery_state
schema:
type: string
description: Exclude orders with this delivery state.
- in: query
name: exclude_legacy
schema:
type: boolean
description: When true, exclude legacy-linked orders.
- in: query
name: field
schema:
type: string
enum:
- total_in_buyer_currency
description: Numeric field to aggregate. Currently only `total_in_buyer_currency` is supported. Defaults to that value.
- in: query
name: lifecycle_state
schema:
type: string
description: Filter by lifecycle state.
- in: query
name: operation
schema:
type: string
enum:
- avg
- max
- min
- sum
description: 'Aggregation operation. One of: sum, avg, min, max.'
required: true
- in: query
name: order_uuids
schema:
type: array
items:
type: string
format: uuid
description: Optional explicit set of order UUIDs to aggregate. Pass as a repeated query param (`?order_uuids=<uuid>&order_uuids=<uuid>`). When present and non-empty, filters are ignored. Every UUID must resolve inside the caller's scope — otherwise the call is rejected with `403 forbidden` to avoid leaking which UUIDs the caller can see.
- in: query
name: payment_status
schema:
type: string
description: Filter by payment status (pay_in_state).
- in: query
name: placed_date_from
schema:
type: string
format: date
description: Placed (created) on/after this date (YYYY-MM-DD).
- in: query
name: placed_date_to
schema:
type: string
format: date
description: Placed (created) on/before this date (YYYY-MM-DD).
- in: query
name: product
schema:
type: string
description: Substring match on any line item's product name.
- in: query
name: search
schema:
type: string
description: Ranked free-text search (order no., PO ref, supplier, address).
- in: query
name: supplier
schema:
type: string
format: uuid
description: Supplier company UUID (legacy alias of supplier_uuid).
- in: query
name: supplier_name
schema:
type: string
description: Substring match on supplier company name.
- in: query
name: supplier_uuid
schema:
type: string
format: uuid
description: Supplier company UUID.
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerOrderAggregateResult'
description: ''
'400':
description: Invalid `operation`, `field`, or `order_uuids` query param.
'403':
description: One or more `order_uuids` are not in the caller's scope.
/api/v1/app-orders/brand/all-order-activities/:
get:
operationId: api_v1_app_orders_brand_all_order_activities_list
description: Returns a paginated list of all order activities from all orders for the buyer company.
summary: List all order activities
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedBuyerOrderActivityWithOrderList'
description: ''
/api/v1/app-orders/brand/grouped-statements/:
get:
operationId: api_v1_app_orders_brand_grouped_statements_list
description: 'Buyer-facing viewset for listing and retrieving grouped statements.
GET /brand/grouped-statements/ — paginated list with filters
GET /brand/grouped-statements/{uuid}/ — detail incl. nested orders and bank details
POST /brand/grouped-statements/{uuid}/mark-transfer-sent/ — signal bank transfer sent'
summary: Buyer endpoints for Grouped Statements
parameters:
- in: query
name: month
schema:
type: string
description: Filter by due date month in YYYY-MM format (e.g. '2026-05').
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- in: query
name: search
schema:
type: string
description: Free-text search across the statement identifier, the merchant-of-record company name, and any contributing order number.
- in: query
name: tab
schema:
type: string
enum:
- awaiting_reconciliation
- cancelled
- paid
- pending
description: Filter by tab. 'pending' groups DUE + OVERDUE.
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedBuyerGroupedStatementListList'
description: ''
/api/v1/app-orders/brand/grouped-statements/{uuid}/:
get:
operationId: api_v1_app_orders_brand_grouped_statements_retrieve
description: 'Buyer-facing viewset for listing and retrieving grouped statements.
GET /brand/grouped-statements/ — paginated list with filters
GET /brand/grouped-statements/{uuid}/ — detail incl. nested orders and bank details
POST /brand/grouped-statements/{uuid}/mark-transfer-sent/ — signal bank transfer sent'
summary: Retrieve a buyer grouped statement with nested orders and bank details
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BuyerGroupedStatementDetail'
description: ''
/api/v1/app-orders/brand/grouped-statements/{uuid}/csv/:
get:
operationId: api_v1_app_orders_brand_grouped_statements_csv_retrieve
description: Returns the statement's contributing orders as an Excel workbook (one row per order plus a Total Amount Due summary row). Opens directly in Excel / Google Sheets with identifiers kept as text and amounts as numbers.
summary: Download a buyer grouped statement as an Excel (.xlsx) file
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
schema:
type: string
format: binary
description: ''
/api/v1/app-orders/brand/grouped-statements/{uuid}/invoices/:
get:
operationId: api_v1_app_orders_brand_grouped_statements_invoices_retrieve
description: Returns a .zip bundling each contributing order's Two invoice PDF (one `invoice_<order>.pdf` per order). This is invoices only — it contains no statement summary file. Orders whose invoice is not yet available from the payment provider, or that were skipped because the archive hit its size / time bound, are listed in a `missing-invoices.txt` manifest inside the archive (with the reason).
summary: Download all of a buyer grouped statement's invoices as a .zip
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/zip:
schema:
type: string
format: binary
description: ''
/api/v1/app-orders/brand/grouped-statements/{uuid}/mark-transfer-sent/:
post:
operationId: api_v1_app_orders_brand_grouped_statements_mark_transfer_sent_create
description: Transitions the statement from DUE or OVERDUE to AWAITING_RECONCILIATION. Only valid when the statement status is DUE or OVERDUE. After a successful call the statement's `status` field will be `awaiting_reconciliation`; use `?tab=awaiting_reconciliation` on the list endpoint to confirm.
summary: Mark a bank transfer as sent
parameters:
- in: path
name: uuid
schema:
type: string
format: uuid
required: true
tags:
- App Orders
security:
- tokenAuth: []
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/
# --- truncated at 32 KB (396 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/opply/refs/heads/main/openapi/opply-app-orders-api-openapi.yml