...
Request Payload Structure
| Code Block |
|---|
{ |
...
"orderId": "ORD-001", |
...
"customer": { |
...
"id": "CUST-001", |
...
"name": "Acme Corporation" |
...
}, |
...
"items": [ |
...
{ |
...
"productId": "PROD-001", |
...
"quantity": 10, |
...
"unitPrice": 99.99 |
...
} |
...
], |
...
"totalAmount": 999.90 |
...
} |
Request Field Mapping
Salesforce Field | API Field | Type | Required | Notes |
[Order.OrderNumber] | [orderId] | [String] | [Yes/No] | [Notes] |
[Account.Name] | [String] | [Yes/No] | [Notes] | |
[...] | [...] | [...] | [...] | [...] |
...
Success Response (HTTP 200/201)
| Code Block |
|---|
{ |
...
"status": "success", |
...
"externalId": "EXT-ORD-001", |
...
"message": "Order created successfully", |
...
"timestamp": "2024-01-15T10:30:00Z" |
...
} |
Error Response Structure
| Code Block |
|---|
{ |
...
"status": "error", |
...
"errorCode": "VALIDATION_ERROR", |
...
"message": "Invalid order data", |
...
"details": [ |
...
{ |
...
"field": "items", |
...
"error": "At least one item is required" |
...
} |
...
] |
...
} |
Response Field Mapping
API Field | Salesforce Field | Type | Notes |
[externalId] | [Order.External_Id__c] | [String] | [Notes] |
[status] | [Order.Integration_Status__c] | [String] | [Notes] |
[...] | [...] | [...] | [...] |
...