Creating a parcel for an SSO customer
Once the customer is signed in with INEX ID, you no longer need their personal number, name and phone to create a parcel in their name — the sub is enough.
How
POST
/integrators/parcels/create
Call the usual POST /integrators/parcels/create and put only inexUserId — the id_token's sub — in the receiver object. Every other field (tracking, status, delivery, declaration) is unchanged.
| Field | Type | Required | Description |
|---|---|---|---|
| receiver.inexUserId | string (UUID) | Conditional | The customer's permanent, unique identifier. Use it as receiver.inexUserId when creating a parcel. |
| receiver.personalId | string | No | personalId is optional with inexUserId. It is written only when the account has no personal number at all; an existing number is never overwritten. |
Rules
-
1
The receiver is given either in full (
personalId,firstname,lastname,phoneNumber,email— as before) or byinexUserId. Never both. -
2
With
inexUserId,firstname,lastname,phoneNumberandemailare forbidden — the name and phone come from the INEX account. Sending them anyway is refused with 422, so nobody believes the account was changed. -
3
personalIdis optional withinexUserId. It is written only when the account has no personal number at all; an existing number is never overwritten. -
4
inexUserIdnever creates an account — it must belong to an existing, active INEX customer. - 5 Repeating the request with the same tracking returns the parcel already created (idempotent), as before.
Errors
| 422 Unprocessable | inexUserId is not a valid UUID or no such INEX customer exists; or the receiver is given in neither form; or inexUserId is sent together with other receiver fields. |
| 400 Bad Request | The customer's account is inactive or has no active customer profile. |
Completing the profile
If the customer's INEX profile is not complete (e.g. Georgian name, branch or a confirmed personal number), they automatically receive a notification when the parcel is created, saying a parcel was registered in their name and asking them to complete their profile on inex.ge. Nothing is needed on your side.
cURL (receiver by INEX ID)
BASH
curl -X POST https://api.inex.ge/api/v1/integrators/parcels/create \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"clientReferenceId": "ORDER-12345",
"waybillNumbers": ["TRACK-001"],
"status": "created",
"shipmentType": "byAir",
"senderCountryCode": "CN",
"deliveryType": "pickupInStore",
"pickupLocationId": "200001",
"receiver": {
"inexUserId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
},
"declaration": {
"sourceUrl": "https://shop.example.com",
"currencyCode": "USD",
"items": [
{ "price": 2500, "quantity": 1, "description": "T-Shirt" }
]
}
}'
422 — unknown INEX ID
JSON
{
"message": "The selected receiver.inex user id is invalid.",
"errors": {
"receiver.inexUserId": ["The selected receiver.inex user id is invalid."]
}
}
422 — mixed with receiver details
JSON
{
"message": "The receiver.inex user id field prohibits receiver.firstname / receiver.lastname / receiver.phone number / receiver.email from being present.",
"errors": {
"receiver.inexUserId": ["The receiver.inex user id field prohibits receiver.firstname / receiver.lastname / receiver.phone number / receiver.email from being present."]
}
}
400 — inactive account
JSON
{
"errors": {
"general": ["Failed to create parcel: INEX user found but not active."]
},
"message": "error"
}