GoMake

Gomake API

POST

Create Order

Creates a new sales order in the ERP system

/api/sales-orders/create

Request Body

clientCodestring (required) - Client code
clientNamestring (required) - Client name
agentCodeinteger (optional) - Agent code
invoiceNumberstring (optional) - Invoice number
isVatExemptboolean (optional) - Whether VAT is exempt, default: false
discountnumber (optional) - Discount amount
purchaseNumberstring (optional) - Purchase order number
notesstring (optional) - Order notes
addressCitystring (optional) - Delivery address city
addressStreetstring (optional) - Delivery address street
addressHomeNumberstring (optional) - Delivery address home number
addressNotesstring (optional) - Additional address notes
orderContactsarray (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.