shipping.nc API

Account

Server

Get the signed-in account

GET
https://api.shipping.nc
/v1/auth/me

Returns the signed-in user and every carrier membership with its role.

Get the signed-in account › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Get the signed-in account › Responses

The signed-in account.

user_id
​string · required
email
​string · required
full_name
​string · required
​object[] · required

Invite a team member

POST
https://api.shipping.nc
/v1/auth/invitations

Carrier admins only. Returns 201 for a new invitation and 200 when a pending invitation for the same email and role already exists.

Invite a team member › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Invite a team member › Request Body

email
​string · email · maxLength: 254 · pattern: ^(?:[A-Za-z0-9_'+\-]… · required
role
​string · enum · required
Enum values:
carrier_admin
dispatcher
driver
shipper
full_name
​string · minLength: 1 · maxLength: 120

Who is invited, shown in the team list until they answer.

Example: Aline Bernard
phone
​string

Their phone, to reach a driver before their phone is paired.

Example: +687 78 12 34
shipper_account_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Invite a team member › Responses

The pending invitation that already existed.

id
​string · required
email
​string · required
role
​string · enum · required
Enum values:
carrier_admin
dispatcher
driver
shipper
shipper_account_id
​string | null · required
expires_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
created_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
accept_url
​string · uri

The accept link, only in the response that minted the token and only on a stage that sends no invitation email (demo). Elsewhere the email is the only copy.

Example: https://app.demo.shipping.nc/invite#token=8mA2pQ3rS4tU5vW6xY7zA8bC9dE0fG1hI2jK3lM4nO5

Accept an invitation

POST
https://api.shipping.nc
/v1/auth/invitations/accept

Without an Authorization header, creates the account with the given password and name. With one, adds the membership to the signed-in account and only the token is read. Answers 409 account_exists when the email already has an account: sign in, then accept again. Answers 409 invitation_for_another_account when the signed-in account is not the invited email.

Accept an invitation › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Accept an invitation › Request Body

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = object · requires: token, password, full_name
type = object · requires: token
Properties for Variant 1:
token
​string · pattern: ^[A-Za-z0-9_-]{43}$ · required
password
​string · minLength: 12 · maxLength: 256 · pattern: (?=.*(?:(?=.*(?:[a-z… · required
full_name
​string · minLength: 1 · maxLength: 120 · required
phone
​string

A phone number. Six digits without a prefix are read as a New Caledonia number (+687).

Example: +687 78 12 34

Accept an invitation › Responses

The carrier and role granted.

carrier_id
​string · required
role
​string · enum · required
Enum values:
carrier_admin
dispatcher
driver
shipper

Preview an invitation

POST
https://api.shipping.nc
/v1/auth/invitations/preview

Public, with the token of the email. An unknown, expired, accepted or revoked token gives not_found.

Preview an invitation › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Preview an invitation › Request Body

token
​string · pattern: ^[A-Za-z0-9_-]{43}$ · required

Preview an invitation › Responses

What the invited person sees before accepting.

What the invited person sees before accepting. Nothing else of the carrier is exposed.
​object · required
email
​string · required
full_name
​string | null · required

The name the inviter gave, to fill in the form.

Example: Kevin Martin
phone
​string | null · required

E.164 format; the phone the inviter gave, to fill in the form.

Example: +687781234
role
​string · enum · required
Enum values:
carrier_admin
dispatcher
driver
shipper
shipper_account_name
​string | null · required
invited_by_name
​string | null · required

Null when the platform sent the invitation.

Example: Henri Moreau
created_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
expires_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

Decline an invitation

POST
https://api.shipping.nc
/v1/auth/invitations/decline

Public, with the token of the email. The invitation is revoked and its link stops working.

Decline an invitation › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Decline an invitation › Request Body

token
​string · pattern: ^[A-Za-z0-9_-]{43}$ · required

Decline an invitation › Responses

Done.

No data returned