Skip to main content
POST
/
orders
Create order
curl --request POST \
  --url https://staging-v2.sparqle.tech/orders \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "locationId": "ABC123",
  "orderRef": "PADE3JWEA",
  "deliveryName": "Jane Doe",
  "deliveryAddress": {
    "street": "Gustav Mahlerlaan",
    "houseNumber": "320",
    "postalCode": "1082 ME",
    "city": "Amsterdam",
    "suffix": "",
    "countryCode": "NL"
  },
  "name": "iPod",
  "description": "ABC",
  "deliveryEmail": "[email protected]",
  "deliveryPhone": "+31612345678",
  "deliveryDate": "2026-08-13",
  "deliveryNote": "Please leave the package at the door when I am not home.",
  "isBusiness": false,
  "barcode": "0123456789",
  "height": 120.5,
  "length": 200,
  "width": 75.5,
  "weight": 22.5,
  "deliverAtPickupPoint": false,
  "pickupPoint": "161427"
}
'
{
  "id": 1,
  "orderId": "SPQ-10293",
  "orderRef": "PADE3JWEA",
  "status": "draft",
  "name": "iPod",
  "barcode": "3STBXX123456789",
  "trackingUrl": "https://tracking.sparqle.com/barcode/3STBXX123456789",
  "deliveryName": "Jane Doe",
  "deliveryEmail": "[email protected]",
  "deliveryAddress": "Gustav Mahlerlaan 320, 1082 ME Amsterdam",
  "deliveryEta": "12:40 - 13:00",
  "deliveryEtaDate": "2026-08-13",
  "deliveryDate": "2026-08-13",
  "locationId": 1,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

api-key
string
header
required

Body

application/json
locationId
string
required

Pickup location the order is dispatched from.

Maximum string length: 20
Example:

"ABC123"

orderRef
string
required

Your own reference for the order. Keep it unique.

Maximum string length: 100
Example:

"PADE3JWEA"

deliveryName
string
required
Maximum string length: 100
Example:

"Jane Doe"

deliveryAddress
object
required
name
string
Example:

"iPod"

description
string
Maximum string length: 100
Example:

"ABC"

deliveryEmail
string<email>
deliveryPhone
string
Maximum string length: 30
Example:

"+31612345678"

deliveryDate
string<date>

Optional requested delivery date (must be in the future).

Example:

"2026-08-13"

deliveryNote
string
Maximum string length: 100
Example:

"Please leave the package at the door when I am not home."

isBusiness
boolean
Example:

false

barcode
string

Barcode of the collo.

Maximum string length: 25
Example:

"0123456789"

height
number

Height of the collo (mm).

Required range: x <= 1000
Example:

120.5

length
number

Length of the collo (mm).

Required range: x <= 1000
Example:

200

width
number

Width of the collo (mm).

Required range: x <= 1000
Example:

75.5

weight
number

Weight of the collo (g).

Required range: x <= 20000
Example:

22.5

deliverAtPickupPoint
boolean

Only if pickup points are enabled.

Example:

false

pickupPoint
string

Only if pickup points are enabled.

Example:

"161427"

Response

Order created

id
integer
Example:

1

orderId
string
Example:

"SPQ-10293"

orderRef
string
Example:

"PADE3JWEA"

status
enum<string>
Available options:
draft,
expected,
in_transit,
out_for_delivery,
awaiting_next_attempt,
at_pickup_point,
completed,
failed,
in_return_transit,
returned,
cancelled,
rejected,
address_not_found,
inactive,
missing,
lost,
error
Example:

"draft"

name
string
Example:

"iPod"

barcode
string
Example:

"3STBXX123456789"

trackingUrl
string
Example:

"https://tracking.sparqle.com/barcode/3STBXX123456789"

deliveryName
string
Example:

"Jane Doe"

deliveryEmail
string
deliveryAddress
string
Example:

"Gustav Mahlerlaan 320, 1082 ME Amsterdam"

deliveryEta
string
Example:

"12:40 - 13:00"

deliveryEtaDate
string<date>
Example:

"2026-08-13"

deliveryDate
string
Example:

"2026-08-13"

locationId
integer
Example:

1

createdAt
string<date-time>
updatedAt
string<date-time>