POST
Create Order
Creates a new sales order in the ERP system
/api/sales-orders/createRequest Body
clientCodestring (required) - Client codeclientNamestring (required) - Client nameagentCodeinteger (optional) - Agent codeinvoiceNumberstring (optional) - Invoice numberisVatExemptboolean (optional) - Whether VAT is exempt, default: falsediscountnumber (optional) - Discount amountpurchaseNumberstring (optional) - Purchase order numbernotesstring (optional) - Order notesaddressCitystring (optional) - Delivery address cityaddressStreetstring (optional) - Delivery address streetaddressHomeNumberstring (optional) - Delivery address home numberaddressNotesstring (optional) - Additional address notesorderContactsarray (required) - List of order contacts. See array structure below.Array Structure: orderContacts
The orderContacts array contains contact objects with the following structure:
orderContacts: [
{
contactName: string (required)
contactPhone: string (required)
contactMail: string (required)
}
]
{
"clientCode": "CLIENT001",
"clientName": "Acme Corporation",
"agentCode": 123,
"invoiceNumber": "INV-2024-001",
"isVatExempt": false,
"discount": 0,
"purchaseNumber": "PO-2024-001",
"notes": "Rush order - please expedite",
"addressCity": "New York",
"addressStreet": "Broadway",
"addressHomeNumber": "123",
"addressNotes": "Building A, Floor 5",
"orderContacts": [
{
"contactName": "John Doe",
"contactPhone": "+1234567890",
"contactMail": "john.doe@acme.com"
}
]
}Responses
200Order created successfully
{
"success": true,
"data": "123e4567-e89b-12d3-a456-426614174000"
}Returns the created order ID (GUID) as a string
400Bad request - Invalid input data
401Unauthorized - Invalid or missing API token
500Internal server error
Example Request
curl -X POST \
https://api.gomake.net/api/sales-orders/create \
-H "Content-Type: application/json" \
-H "X-Client-Id: your-client-id-here" \
-H "X-Client-Secret: your-client-secret-here" \
-d '{
"clientCode": "CLIENT001",
"clientName": "Acme Corporation",
"agentCode": 123,
"invoiceNumber": "INV-2024-001",
"isVatExempt": false,
"discount": 0,
"purchaseNumber": "PO-2024-001",
"notes": "Rush order - please expedite",
"addressCity": "New York",
"addressStreet": "Broadway",
"addressHomeNumber": "123",
"addressNotes": "Building A, Floor 5",
"orderContacts": [
{
"contactName": "John Doe",
"contactPhone": "+1234567890",
"contactMail": "john.doe@acme.com"
}
]
}'Note: Replace your-client-id-here and your-client-secret-here with your actual credentials. See the Authentication page for more details.
