POST
Create Order Item
Adds an item to an existing sales order
/api/sales-orders/createItemRequest Body
isForTestingboolean (optional) - Whether this is a test order itemorderIdstring (required) - Order ID (GUID)productIdstring (required) - Product ID (external code). Use '0' for delivery productproductNamestring (optional) - Product namekeystring (required) - Unique key for this order itemforItemKeysarray (optional) - List of keys for related items. See array structure below.deliveryDatestring (optional) - Delivery date in ISO 8601 formatunitPricenumber (optional) - Unit pricequantitynumber (required) - Quantitydiscountnumber (optional) - Discount amountworkNamestring (optional) - Work namenotesstring (optional) - Order item notesgraphicsNotesstring (optional) - Graphics-related notescoverPdfUrlstring (optional) - URL to cover PDF fileinternalPagesPdfUrlstring (optional) - URL to internal pages PDF filepixKeystring (optional) - Pix key identifierparameterValuesarray (optional) - Product parameter values. See array structure below.Array Structures
forItemKeys
Array of strings representing keys of related items:
forItemKeys: string[]
parameterValues
Array of product parameter value objects:
parameterValues: [
{
valueId: integer (optional)
parameterName: string (optional)
valueName: string (optional)
textValue: string (optional)
parameterId: integer (optional)
}
]
{
"isForTesting": false,
"orderId": "123e4567-e89b-12d3-a456-426614174002",
"productId": "PROD-001",
"productName": "Business Cards",
"key": "ITEM-001",
"forItemKeys": [],
"deliveryDate": "2024-12-31T00:00:00Z",
"unitPrice": 149.99,
"quantity": 100,
"discount": 0,
"workName": "Standard Business Cards",
"notes": "Print on premium cardstock",
"graphicsNotes": "Use CMYK color profile",
"coverPdfUrl": "https://example.com/files/cover.pdf",
"internalPagesPdfUrl": null,
"pixKey": "PIX-001",
"parameterValues": [
{
"valueId": 1,
"parameterName": "Paper Type",
"valueName": "Premium Cardstock",
"textValue": null,
"parameterId": 10
},
{
"valueId": 2,
"parameterName": "Finish",
"valueName": "Matte",
"textValue": null,
"parameterId": 11
}
]
}Responses
200Order item created successfully
Returns empty response body on success
400Bad request - Invalid input data
401Unauthorized - Invalid or missing API token
404Not found - Order or Product not found
{
"success": false,
"error": "Product not found"
}409Conflict - Order item with the same key already exists
{
"success": false,
"error": "Order item exists with the same key"
}500Internal server error
Example Request
curl -X POST \
https://api.gomake.net/api/sales-orders/createItem \
-H "Content-Type: application/json" \
-H "X-Client-Id: your-client-id-here" \
-H "X-Client-Secret: your-client-secret-here" \
-d '{
"isForTesting": false,
"orderId": "123e4567-e89b-12d3-a456-426614174002",
"productId": "PROD-001",
"productName": "Business Cards",
"key": "ITEM-001",
"forItemKeys": [],
"deliveryDate": "2024-12-31T00:00:00Z",
"unitPrice": 149.99,
"quantity": 100,
"discount": 0,
"workName": "Standard Business Cards",
"notes": "Print on premium cardstock",
"graphicsNotes": "Use CMYK color profile",
"coverPdfUrl": "https://example.com/files/cover.pdf",
"internalPagesPdfUrl": null,
"pixKey": "PIX-001",
"parameterValues": [
{
"valueId": 1,
"parameterName": "Paper Type",
"valueName": "Premium Cardstock",
"textValue": null,
"parameterId": 10
},
{
"valueId": 2,
"parameterName": "Finish",
"valueName": "Matte",
"textValue": null,
"parameterId": 11
}
]
}'Note: Replace your-client-id-here and your-client-secret-here with your actual credentials. See the Authentication page for more details.
