1. Help Center
  2. API documentation

Step 4: Create an Order using the Yojee API

This article is part of a 9-step guide to the Yojee API

Use this endpoint to create a new order using a Sender account.

Request Parameters

Parameter

Required?

Type

Description

access_token

Yes

String

Access token generated 

company_slug

Yes

String

Dispatcher company slug

sender_organisation_slug

No

String

Sender organisation slug

items

Yes

Object

List of items to be sent

steps

Yes

String

List of delivery details for pick up and drop off steps

Item_steps

Yes

String

List of item steps

sender_id

Yes

String

Sender ID

sender_type

No

String

Sender type

price_amount

Yes

Number

Order price

price_currency

Yes

String

Order currency

Request Sample cURL/Payload

curl -X POST "https://umbrella.yojee.com/api/v3/sender/orders" -H "accept: application/json" -H "ACCESS_TOKEN: pCVPeEEUuKnM7geUOcSLY2imA5l6YUdjymkApBDAAGY=" -H "COMPANY_SLUG: yojee" -H "content-type: application/json" -d "{ \"items\": [ { \"description\": \"Gift\", \"height\": 1, \"length\": 1, \"payload_type\": \"Package\", \"volumetric_weight\": 10, \"weight\": 1, \"width\": 1, \"external_customer_id\": \"external_customer_id_test\", \"service_type\": \"sameday\" } ], \"steps\": [ { \"address\": \"144 Ronbinson Road Singapore\", \"address2\": \"Level 1\", \"postal_code\": \"50480\", \"state\": \"Singapore\", \"country\": \"Singapore\", \"contact_name\": \"ACE\", \"contact_phone\": \"+60121234567\", \"contact_company\": \"Adidas\", \"from_time\": \"2019-06-28T15:49:43.096036\", \"to_time\": \"2019-06-28T15:49:43.096036\", \"lat\": 1.2782636, \"lng\": 103.8481705 }, { \"address\": \"166 East Coast Road, Singapore\", \"address2\": \"1-01\", \"postal_code\": \"428872\", \"state\": \"Singapore\", \"country\": \"Singapore\", \"contact_name\": \"ABC\", \"contact_phone\": \"+65121234567\", \"contact_company\": \"Nike\", \"from_time\": \"2019-06-28T15:49:43.096036\", \"to_time\": \"2019-06-28T15:49:43.096036\", \"lat\": 1.4630478, \"lng\": 103.7647132 } ], \"item_steps\": [ {\"order_step_id\": 0, \"type\": \"pickup\", \"item_id\": 0}, {\"order_step_id\": 1, \"type\": \"dropoff\", \"item_id\": 0} ], \"sender_id\": 864, \"sender_type\": \"individual\", \"price_amount\": 10, \"price_currency\": \"SGD\" }"

Sample Response Body

Server Code Status: 200 => Create order response success

Server Code Status: 422 => OrderMap { "message": “Order creation failed!” }

example value(s)

{
"data": {
"cancelled_at": null,
"container_no": null,
"display_price": "SGD 10",
"external_id": null,
"id": 6232,
"inserted_at": "2019-06-04T04:01:04.307128Z",
"number": "O-LOXUINQXEDGT",
"order_items": [
{
"id": 50016,
"tracking_number": "YOJ-VYOFVPA43FMB"
}
],
"placed_by_user_profile_id": 2359,
"price": {
"amount": "10",
"currency": "SGD"
},
"sender_id": 475,
"status": "created"
}
}