Skip to main content
POST
Add an order item

Authorizations

Authorization
string
header
required

Salesforce session ID (or OAuth 2.0 access token issued by the Salesforce org) supplied as Authorization: Bearer <token>. Obtain via the Salesforce OAuth 2.0 flows or the SOAP login API.

Body

application/json
orderId
string
required

Salesforce Id of the parent Order.

accountId
string
required

Salesforce Id of the Account associated with the line item.

contactId
string
required

Salesforce Id of the Contact associated with the line item.

productId
string
required

Salesforce Id of the Product2 record. Must have FCORE_PAY__System_Category__c populated and a matching FCORE_PAY__Product_Config__mdt.

quantity
integer
required

Number of units to add. Must be greater than zero.

Required range: x >= 1
subscriptionPlanId
string

Salesforce Id of the Subscription Plan. Used only for products whose config class is a FCORE_MEM.SubscriptionOrderItemConfigDTO.

startDate
string<date>

Subscription start date (ISO 8601, e.g. 2026-01-01).

endDate
string<date>

Subscription end date (ISO 8601). When both startDate and endDate are supplied, startDate must be strictly before endDate.

Response

Order item created.

Common envelope returned by every endpoint. Concrete responses extend this shape with operation-specific fields.

success
boolean

true when the request completed without errors.

errors
string[]

Populated with one or more error messages when success is false.

id
string

Salesforce Id of the created Order Item.