Creation
API endpoint for creating a new delivery job via an API key.
Endpoint
Creates a new job, optionally finding or creating the associated client and handling specific job addresses.
Authentification
This endpoint requires authentification via a custom API header.
Replace YOUR_SECRET_API_KEY with the actual secret key generated within the Logis application. The request will fail if this header is missing or invalid.
Furthermore, the API key used must have the "Allow Job Creation" permission enabled in the Logis settings.
Request Body
The endpoint expects a JSON payload in the request body with the following structure:
Fields
Job
Object (Required)
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | A descriptive name for the job (e.g., "Package Delivery", "Document Pickup"). Max 100 chars. |
deadline | string | Yes | The date and time by which the job must be completed. Must be in ISO 8601 format (e.g., YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS+HH:MM ). Cannot be past. |
notes | string | Optional | Additional instructions or information relevant to the job itself. Max 1500 chars. |
item_count | integer | Optional | The number of items involved in the job. If provided, must be greater than 0. |
do_notify_sms | boolean | Optional | Overrides client's SMS notification preference for this specific job. Defaults to client.do_notify_sms which itself defaults to true. |
code_secure_deliveries | boolean | Optional | Overrides client's preference, requesting a secret code for delivery confirmation. Depends on company settings. Defaults to client → company → false. |
Client
Object (Required)
This section identifies the end client for the job. The system uses the following logic based on API key settings:
- ID Lookup: If id is provided, the system attempts to find an existing EndClient with that UUID belonging to the user associated with the API key.
- Auto-Matching: If id is not provided or the client isn't found, and the API key has client matching enabled, the system searches for an existing client matching the provided details.
- Auto-Creation: If no client is found via ID or matching, and the API key has client creation enabled, the system attempts to create a new EndClient using the provided details.
Field | Type | Required | Description |
---|---|---|---|
id | string | Optional (UUID) | Provide the existing EndClient UUID if known. If provided, other fields (first_name , last_name , phone , email ) are mostly ignored unless creation is needed. |
first_name | string | Yes (if creating) | Client's first name. Required if id is not provided and auto-creation/matching is needed. Max 100 chars. |
last_name | string | Yes (if creating) | Client's last name. Required if id is not provided and auto-creation/matching is needed. Max 100 chars. |
phone_number | string | Yes (if creating/matching and email is missing) | Client's phone number. Must be in format +1 XXX-XXX-XXXX . Used for matching if id is not provided. |
email | string | Yes (if creating/matching and phone is missing) | Client's email address. Used for matching if id is not provided. |
notes | string | Optional | General notes about the client. Max 1000 chars. Used only during client creation. |
do_notify_sms | boolean | Optional | Client's general preference for receiving SMS notifications for jobs. Defaults to true. Used only during client creation. |
code_secure_deliveries | boolean | Optional | Client's preference for requiring secure delivery codes. Defaults based on the adding user's company setting, then false. Used only during client creation. |
To ensure data consistency, it is recommended to send as much data as possible if matching.
Address
Object (Optional if not creating client)
This object is used if a client needs to be created (a client must have an associated address). If a client is found or matched, this object will only be used if it differs from the client's default address, thus overriding this specific job's delivery address.
You can send this job with every request for safety purposes.
Field | Type | Required (if address object present) | Description |
---|---|---|---|
building_number | integer | Yes | The street number of the address. |
street_name | string | Yes | The name of the street. Max 250 chars. |
apt_number | string | Optional | Apartment, suite, unit number, etc. Max 50 chars. |
city | string | Yes | The city name. Max 100 chars. |
postal_code | string | Yes | The postal or zip code. Max 20 chars. |
notes | string | Optional | Specific notes for this address (e.g., gate code, delivery instructions). Max 1000 chars. |
Success Response
Upon creation an SMS will be sent to the client's phone number with a link to track their order on Logis' public tracking page
If possible, it is recommended to store and associate the passed client uuid for further orders by this client, to guarantee data consistency.
Error Responses
Status Code | Error Code / Reason | Description |
---|---|---|
400 Bad Request | Missing Sections (job, client) | The top-level job or client object was missing from the request body. |
400 Bad Request | Invalid Data (e.g., invalid deadline) | Data within the job , client , or address objects failed validation (e.g., past deadline, bad format). |
400 Bad Request | Invalid Address (address creation failed) | Geocoding or validation failed for the provided address object. |
401 Unauthorized | Missing LOGIS-API-KEY header | The required API key header was not included. |
403 Forbidden | Invalid/Inactive LOGIS-API-KEY | The provided API key is not valid or is inactive. |
403 Forbidden | Permission Denied (allow_job_creation) | The API key used does not have permission to create jobs. |
404 Not Found | Client ID Not Found | A client.id was provided, but no matching client was found for the API key's user. |
412 Precondition Failed | Client Not Found & Auto-Create Off | No client id provided, no matching client found, and auto_create_clients is disabled for the API key. |