sitecore Orders API
Endpoints for creating, retrieving, updating, and deleting order records associated with guests. Orders capture purchase transactions including line items, payments, and fulfillment data.
Endpoints for creating, retrieving, updating, and deleting order records associated with guests. Orders capture purchase transactions including line items, payments, and fulfillment data.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sitecore:sitecore-orders-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Sitecore Orders API
version: '1.0'
description: 'Operations tagged Orders across 2 of this provider''s published API definitions: sitecore-cdp-rest-api-openapi.yml, sitecore-ordercloud-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-engage-eu.sitecorecloud.io
description: EU Production Server
- url: https://api-engage-us.sitecorecloud.io
description: US Production Server
- url: https://api-engage-ap.sitecorecloud.io
description: Asia-Pacific Production Server
- url: https://api-engage-jpe.sitecorecloud.io
description: Japan Production Server
- url: https://api.ordercloud.io/v1
description: OrderCloud Production Server
tags:
- name: Orders
description: Endpoints for creating, retrieving, updating, and deleting order records associated with guests. Orders capture purchase transactions including line items, payments, and fulfillment data.
paths:
/v2.1/guests/{guestRef}/orders:
get:
operationId: listGuestOrders
summary: List guest orders
description: Retrieves all orders associated with a guest profile. Returns order summaries including order references, totals, status, and creation dates.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/guestRef'
responses:
'200':
description: List of orders for the guest
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Order'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
security:
- basicAuth: []
post:
operationId: createOrder
summary: Create an order
description: Creates a new order record associated with a guest profile. Orders capture purchase transactions and support segmentation and personalization based on purchasing behavior. The referenceId and orderedAt fields are immutable after creation.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/guestRef'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
responses:
'201':
description: Order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
security:
- basicAuth: []
servers:
- url: https://api-engage-eu.sitecorecloud.io
description: EU Production Server
- url: https://api-engage-us.sitecorecloud.io
description: US Production Server
- url: https://api-engage-ap.sitecorecloud.io
description: Asia-Pacific Production Server
- url: https://api-engage-jpe.sitecorecloud.io
description: Japan Production Server
/v2.1/guests/{guestRef}/orders/{orderRef}:
get:
operationId: getOrder
summary: Get an order
description: Retrieves a specific order by its reference identifier. Returns the full order object including all line items, contacts, and data extensions.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/guestRef'
- $ref: '#/components/parameters/orderRef'
responses:
'200':
description: Order details
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
security:
- basicAuth: []
put:
operationId: updateOrder
summary: Update an order
description: Performs a full replacement update of an order record. Note that the referenceId and orderedAt fields cannot be changed after the order has been created.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/guestRef'
- $ref: '#/components/parameters/orderRef'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
responses:
'200':
description: Order updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
security:
- basicAuth: []
delete:
operationId: deleteOrder
summary: Delete an order
description: Permanently deletes an order record and all associated items, contacts, consumers, and data extensions. This operation is irreversible.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/guestRef'
- $ref: '#/components/parameters/orderRef'
responses:
'204':
description: Order deleted successfully
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
security:
- basicAuth: []
servers:
- url: https://api-engage-eu.sitecorecloud.io
description: EU Production Server
- url: https://api-engage-us.sitecorecloud.io
description: US Production Server
- url: https://api-engage-ap.sitecorecloud.io
description: Asia-Pacific Production Server
- url: https://api-engage-jpe.sitecorecloud.io
description: Japan Production Server
/orders/{direction}:
get:
operationId: listOrders
summary: List orders
description: Retrieves a paginated list of orders in the specified direction context. Use 'Incoming' for orders received by the seller and 'Outgoing' for orders placed by a buyer. Supports filtering, sorting, and pagination.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/search'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/page'
- name: buyerID
in: query
description: Filter orders by buyer identifier
required: false
schema:
type: string
- name: status
in: query
description: Filter orders by status
required: false
schema:
type: string
enum:
- Unsubmitted
- Open
- AwaitingApproval
- Declined
- Completed
- Canceled
responses:
'200':
description: A paginated list of orders
content:
application/json:
schema:
$ref: '#/components/schemas/OrderListResponse'
'401':
$ref: '#/components/responses/Unauthorized_2'
security:
- bearerAuth: []
post:
operationId: postOrdersByDirection
summary: Create an order
description: Creates a new order in the specified direction context. New orders begin in the Unsubmitted status. Line items, promotions, and payments can be added before the order is submitted.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest_2'
responses:
'201':
description: Order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Order_2'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized_2'
security:
- bearerAuth: []
x-operation-id-source: normalized
x-operation-id-original: createOrder
servers:
- url: https://api.ordercloud.io/v1
description: OrderCloud Production Server
/orders/{direction}/{orderID}:
get:
operationId: getOrdersByDirectionByOrderID
summary: Get an order
description: Retrieves a specific order by its identifier and direction. Returns the full order object including status, totals, shipping address, and billing address.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
responses:
'200':
description: Order details
content:
application/json:
schema:
$ref: '#/components/schemas/Order_2'
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
x-operation-id-source: normalized
x-operation-id-original: getOrder
put:
operationId: putOrdersByDirectionByOrderID
summary: Update an order
description: Performs a full replacement update of an order. Only orders in Unsubmitted status can be updated. Submitted orders cannot be modified.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest_2'
responses:
'200':
description: Order updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Order_2'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
x-operation-id-source: normalized
x-operation-id-original: updateOrder
delete:
operationId: deleteOrdersByDirectionByOrderID
summary: Delete an order
description: Permanently deletes an order. Only unsubmitted orders can be deleted.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
responses:
'204':
description: Order deleted successfully
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
x-operation-id-source: normalized
x-operation-id-original: deleteOrder
servers:
- url: https://api.ordercloud.io/v1
description: OrderCloud Production Server
/orders/{direction}/{orderID}/submit:
post:
operationId: submitOrder
summary: Submit an order
description: Submits an order for fulfillment. The order must be in Unsubmitted status and have all required line items, payment methods, and addresses set before submission. Submitted orders transition to Open or AwaitingApproval status.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
responses:
'200':
description: Order submitted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Order_2'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
servers:
- url: https://api.ordercloud.io/v1
description: OrderCloud Production Server
/orders/{direction}/{orderID}/lineitems:
get:
operationId: listLineItems
summary: List order line items
description: Retrieves all line items within a specific order. Each line item represents a product or variant being purchased with a specified quantity and pricing.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
responses:
'200':
description: List of order line items
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemListResponse'
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
post:
operationId: createLineItem
summary: Create a line item
description: Adds a line item to an order specifying a product and quantity. Specs and spec option values can be provided to select a specific product variant.
tags:
- Orders
parameters:
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/orderID'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateLineItemRequest'
responses:
'201':
description: Line item added to order
content:
application/json:
schema:
$ref: '#/components/schemas/LineItem'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized_2'
'404':
$ref: '#/components/responses/NotFound'
security:
- bearerAuth: []
servers:
- url: https://api.ordercloud.io/v1
description: OrderCloud Production Server
components:
parameters:
orderRef:
name: orderRef
in: path
description: The unique reference identifier for the order
required: true
schema:
type: string
guestRef:
name: guestRef
in: path
description: The unique reference identifier for the guest profile
required: true
schema:
type: string
pageSize:
name: pageSize
in: query
description: Number of items to return per page (max 100)
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
search:
name: search
in: query
description: Full-text search term to filter results
required: false
schema:
type: string
page:
name: page
in: query
description: Page number to retrieve (1-indexed)
required: false
schema:
type: integer
minimum: 1
default: 1
orderID:
name: orderID
in: path
description: The unique identifier of the order
required: true
schema:
type: string
direction:
name: direction
in: path
description: The order direction context - Incoming (seller view) or Outgoing (buyer view)
required: true
schema:
type: string
enum:
- Incoming
- Outgoing
responses:
NotFound:
description: The requested resource was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadRequest:
description: The request body or parameters are invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized:
description: Authentication credentials are missing or invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized_2:
description: Authentication token is missing or invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse_2'
schemas:
CreateOrderRequest:
type: object
description: Request body for creating or updating an order record
required:
- referenceId
- orderedAt
properties:
referenceId:
type: string
description: An external reference identifier for the order. Cannot be changed after creation.
status:
type: string
description: The current status of the order
enum:
- PENDING
- CONFIRMED
- SHIPPED
- DELIVERED
- CANCELED
currencyCode:
type: string
description: The ISO 4217 currency code for the order
totalPrice:
type: number
description: The total price of the order
format: float
orderedAt:
type: string
description: The ISO 8601 timestamp when the order was placed. Cannot be changed after creation.
format: date-time
ErrorResponse:
type: object
description: An error response body
properties:
message:
type: string
description: A human-readable error message
statusCode:
type: integer
description: The HTTP status code
errors:
type: array
description: List of detailed error messages
items:
type: string
Order:
type: object
description: A purchase transaction record associated with a guest profile
properties:
orderRef:
type: string
description: The unique reference identifier for the order
referenceId:
type: string
description: An external reference identifier for the order, immutable after creation. Orders with the same referenceId and orderedAt within two days are grouped.
status:
type: string
description: The current status of the order
enum:
- PENDING
- CONFIRMED
- SHIPPED
- DELIVERED
- CANCELED
currencyCode:
type: string
description: The ISO 4217 currency code for the order
example: USD
totalPrice:
type: number
description: The total price of the order
format: float
orderedAt:
type: string
description: The ISO 8601 timestamp when the order was placed. Immutable after creation.
format: date-time
createdAt:
type: string
description: The ISO 8601 timestamp when the order record was created in CDP
format: date-time
items:
type: array
description: Line items included in the order
items:
$ref: '#/components/schemas/OrderItem'
OrderItem:
type: object
description: A line item within an order representing a purchased product
properties:
itemRef:
type: string
description: The unique reference identifier for the order item
sku:
type: string
description: The product SKU or identifier
name:
type: string
description: The product name
quantity:
type: integer
description: The quantity of this product purchased
minimum: 1
price:
type: number
description: The unit price of the product
format: float
totalPrice:
type: number
description: The total price for this line item (quantity * price)
format: float
LineItem:
type: object
description: A line item within an OrderCloud order
properties:
ID:
type: string
description: The unique identifier of the line item
ProductID:
type: string
description: The identifier of the product for this line item
Quantity:
type: integer
description: The quantity of the product ordered
minimum: 1
UnitPrice:
type: number
description: The unit price of the product
format: float
LineTotal:
type: number
description: The total price for this line item
format: float
ShippingAddressID:
type: string
description: The identifier of the shipping address for this line item
xp:
type: object
description: Extended properties for custom line item attributes
additionalProperties: true
Address:
type: object
description: A shipping or billing address
properties:
ID:
type: string
description: The unique identifier of the address
FirstName:
type: string
description: The recipient's first name
LastName:
type: string
description: The recipient's last name
Company:
type: string
description: The company name at this address
Street1:
type: string
description: The primary street address line
Street2:
type: string
description: The secondary street address line
City:
type: string
description: The city name
State:
type: string
description: The state or province code
Zip:
type: string
description: The postal or ZIP code
Country:
type: string
description: The ISO 3166-1 alpha-2 country code
example: US
Phone:
type: string
description: The phone number associated with this address
ErrorResponse_2:
type: object
description: An error response body
properties:
Errors:
type: array
description: List of error details
items:
$ref: '#/components/schemas/ErrorDetail'
CreateLineItemRequest:
type: object
description: Request body for creating a line item
required:
- ProductID
- Quantity
properties:
ProductID:
type: string
description: The identifier of the product to add
Quantity:
type: integer
description: The quantity to purchase
minimum: 1
ShippingAddressID:
type: string
description: The identifier of the shipping address for this item
xp:
type: object
description: Extended properties for custom line item attributes
additionalProperties: true
OrderListResponse:
type: object
description: A paginated list of orders
properties:
Meta:
$ref: '#/components/schemas/ListMetadata'
Items:
type: array
description: The orders for the current page
items:
$ref: '#/components/schemas/Order_2'
LineItemListResponse:
type: object
description: A paginated list of order line items
properties:
Meta:
$ref: '#/components/schemas/ListMetadata'
Items:
type: array
description: The line items for the current page
items:
$ref: '#/components/schemas/LineItem'
ListMetadata:
type: object
description: Pagination metadata for list responses
properties:
Page:
type: integer
description: The current page number (1-indexed)
PageSize:
type: integer
description: The number of items per page
TotalCount:
type: integer
description: The total number of items matching the query
TotalPages:
type: integer
description: The total number of pages
ItemRange:
type: array
description: The inclusive range [start, end] of item indexes for this page
items:
type: integer
ErrorDetail:
type: object
description: A single error detail
properties:
ErrorCode:
type: string
description: The machine-readable error code
Message:
type: string
description: A human-readable description of the error
Data:
type: object
description: Additional data about the error context
additionalProperties: true
CreateOrderRequest_2:
type: object
description: Request body for creating or updating an order
properties:
BillingAddressID:
type: string
description: The identifier of the billing address
ShippingAddressID:
type: string
description: The identifier of the shipping address
Comments:
type: string
description: Free-form comments for the order
xp:
type: object
description: Extended properties for custom order attributes
additionalProperties: true
UserReference:
type: object
description: A reference to a user who placed or owns an order
properties:
ID:
type: string
description: The unique identifier of the user
FirstName:
type: string
description: The user's first name
LastName:
type: string
description: The user's last name
Username:
type: string
description: The user's login username
Email:
type: string
description: The user's email address
format: email
Order_2:
type: object
description: An order in the OrderCloud marketplace
properties:
ID:
type: string
description: The unique identifier of the order
FromUser:
$ref: '#/components/schemas/UserReference'
BillingAddress:
$ref: '#/components/schemas/Address'
ShippingAddressID:
type: string
description: The identifier of the shipping address for the order
Comments:
type: string
description: Free-form comments attached to the order
LineItemCount:
type: integer
description: The total number of line items in the order
Status:
type: string
description: The current status of the order
enum:
- Unsubmitted
- Open
- AwaitingApproval
- Declined
- Completed
- Canceled
DateCreated:
type: string
description: The ISO 8601 timestamp when the order was created
format: date-time
DateSubmitted:
type: string
description: The ISO 8601 timestamp when the order was submitted
format: date-time
DateApproved:
type: string
description: The ISO 8601 timestamp when the order was approved
format: date-time
DateCompleted:
type: string
description: The ISO 8601 timestamp when the order was completed
format: date-time
Subtotal:
type: number
description: The order subtotal before promotions and shipping
format: float
ShippingCost:
type: number
description: The shipping cost for the order
format: float
TaxCost:
type: number
description: The tax amount for the order
format: float
PromotionDiscount:
type: number
description: The total discount amount from applied promotions
format: float
Total:
type: number
description: The total order amount after all adjustments
format: float
xp:
type: object
description: Extended properties for custom order attributes
additionalProperties: true
securitySchemes:
basicAuth:
type: http
scheme: basic
description: HTTP Basic authentication using a client key as the username and an API token as the password. Credentials are obtained from Sitecore CDP Settings > API access.
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: OAuth 2.0 bearer token obtained from https://auth.ordercloud.io/oauth/token. The token scope determines accessible resources based on assigned roles.
x-refined-from:
- sitecore-cdp-rest-api-openapi.yml
- sitecore-ordercloud-api-openapi.yml