univoozAPI
API referenceOrders

Create an order

POST /v1/orders — send a delivery to a fleet.

POST/v1/orders

Request

{
  "externalOrderId": "PO-88213",
  "branch": "noerrebro",
  "customer": {
    "reference": "cust_8821",
    "firstName": "Alex",
    "lastName": "Doe",
    "email": "alex@example.com",
    "phone": "+45 20 12 34 56",
    "address": {
      "street": "Sortedam Dossering 55",
      "city": "Copenhagen",
      "postcode": "2100"
    }
  },
  "schedule": { "mode": "asap" },
  "weight": 2.5,
  "deliveryInstructions": "Gate code 4471, second floor"
}
FieldTypeRequiredNotes
externalOrderIdstringNoYour order id. Unique in your organization. Always send it — see Stop duplicate orders.
branchstringNoYour branch reference, or the branch UUID. Necessary if you have more than one active branch.
zoneCodestringNoSend to a different connected zone.
customer.referencestringNoYour customer id. Univooz uses it first to find the customer.
customer.firstNamestringNo
customer.lastNamestringNo
customer.companyNamestringNo
customer.emailstringNoUnivooz removes spaces and makes it lower case.
customer.phonestringNoUnivooz converts it to E.164 with your country.
customer.address.streetstringYes
customer.address.citystringYes
customer.address.postcodestringYes
customer.address.coordinatesobjectNo{ latitude, longitude }. Univooz uses these and does no search.
customer.address.notesstringNo
scheduleobjectYesSee Scheduling.
weightnumberNoKilograms. 2 decimals, up to 99999999.99.
numberOfPackagesintegerNo1 to 2147483647.
orderAmountnumberNoThe value of the goods. 2 decimals, up to 9999999999.99.
pickupInstructionsstringNo200 characters.
deliveryInstructionsstringNo200 characters.
pickupContactobjectNo{ name, phone } — the person the courier asks for.
metadataobjectNoText keys and values. 50 keys, keys of 64 characters, values of 500.

A NUL character (U+0000) in a text field gives 400 invalid_request. All other characters are permitted.

Response

201 with the order object.

A rejected request writes nothing — no order, no customer, no address. A second attempt starts from clean data.

Errors

The branch decides the destination

The delivery address does not. Univooz does not check that the destination is in an area the fleet usually serves.

How Univooz finds the customer

Univooz tries three keys, in this sequence:

  1. customer.reference
  2. the phone number, after conversion
  3. the email address, after conversion

The first match wins. No match makes a new customer. Univooz never uses the name.

On a match, Univooz fills empty fields only. It never replaces a value you have.

How Univooz handles the address

If you send coordinates, Univooz uses them and does no search.

If you do not, Univooz searches in your country. It accepts two levels of accuracy: the exact building, or a position calculated between two house numbers. It rejects all other results with a 422.

Univooz uses an address again if it matches an active address of that customer. The comparison removes extra spaces and ignores letter case, across street, city and postcode. Univooz never compares coordinates or notes.

Univooz avoids searches. A stored address costs nothing, and Univooz keeps each result.

The key for a kept result is the complete address. Two different house numbers in one street are two different searches.

Use Check an address when your user types the address.

Charges

Univooz records a charge at creation. Orders inside your plan cost nothing more. Test orders have no charge.

On this page