Add Order Item
Adds a new line item (Order Product) to an existing Order. The product must have a configured System Category and a matching FCORE_PAY__Product_Config__mdt record so that the appropriate Order Item config class can be instantiated. Subscription products may include subscriptionPlanId, startDate, and endDate.
Authorizations
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
Salesforce Id of the parent Order.
Salesforce Id of the Account associated with the line item.
Salesforce Id of the Contact associated with the line item.
Salesforce Id of the Product2 record. Must have FCORE_PAY__System_Category__c populated and a matching FCORE_PAY__Product_Config__mdt.
Number of units to add. Must be greater than zero.
x >= 1Salesforce Id of the Subscription Plan. Used only for products whose config class is a FCORE_MEM.SubscriptionOrderItemConfigDTO.
Subscription start date (ISO 8601, e.g. 2026-01-01).
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.

