Open API

Delivery Job Endpoints

These endpoints use organization-scoped API keys. Agent keys can only access jobs visible to the agent organization. Contractor keys can only access jobs visible to the contractor organization.

Authentication

Send one of these headers on every request.

x-api-key: shiplah_live_xxx

Authorization: Bearer shiplah_live_xxx

Common Types

TypeFormatExample
stringUTF-8 text.MARK-001
integerWhole number. Quantity fields must be at least 1.3
numberDecimal number.12.5
booleantrue or false.false
dateYYYY-MM-DD.2026-05-21
datetimeISO 8601 timestamp.2026-05-21T10:00:00.000Z
GET

/jobs

Returns paginated delivery jobs visible to the API key's organization.

Query Parameters

NameRequiredTypeDescription
marking_numberOptionalstringExact Marking Number match.
batch_numberOptionalstringExact Batch Number match.
normalized_statusOptionalstringExact normalized status code match. See Reference.
updated_at_fromOptionaldateInclude jobs updated on or after this date.
updated_at_toOptionaldateInclude jobs updated on or before this date.
scheduled_date_fromOptionaldateInclude jobs scheduled on or after this date.
scheduled_date_toOptionaldateInclude jobs scheduled on or before this date.
pageOptionalintegerPage number. Default is 1.
page_sizeOptionalintegerItems per page. Default is 10; maximum is 100.

Example Request

curl -H "x-api-key: shiplah_live_xxx" \
  "https://www.shiplahsg.com/api/v1/open-api/jobs?marking_number=MARK-001&page=1&page_size=10"

Response Data

{
  "items": [
    {
      "id": "job-id",
      "marking_number": "MARK-001",
      "batch_number": "BATCH-001",
      "group_code": "A1",
      "piece_quantity": 3,
      "labels": null,
      "pts": 1.5,
      "weight": 12.5,
      "recipient_name": "Jane Tan",
      "recipient_contact": "90000000",
      "delivery_address": "10 Test Road",
      "postal_code": "100001",
      "scheduled_date": "2026-05-21",
      "instructions": "Leave at reception",
      "normalized_status": "completed",
      "failure_reason": null,
      "scheduled_delivery_date": null,
      "scheduled_delivery_pending": false,
      "provider_status": "completed",
      "created_at": "2026-05-20T10:00:00.000Z",
      "updated_at": "2026-05-21T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "total": 1
  }
}
PATCH

/jobs/by-marking/:markingNumber

Updates one delivery job by Marking Number.

Path Parameters

NameRequiredTypeDescription
markingNumberRequiredstring, max 120The delivery job Marking Number.

Request Body

Provide at least one editable field.

NameRequiredTypeDescription
batch_numberOptionalstring or null, max 120Batch Number.
group_codeOptionalstring or null, max 120Warehouse area or group code.
piece_quantityOptionalinteger or null, min 1Number of pieces.
labelsOptionalstring or null, max 255Optional labels.
ptsOptionalnumber or nullPTS value.
weightOptionalnumber or nullWeight.
recipient_nameOptionalstring or null, max 255Recipient name.
recipient_contactOptionalstring or null, max 255Recipient phone or contact.
delivery_addressOptionalstring or null, max 1000Delivery address.
postal_codeOptionalstring or null, max 60Postal code.
scheduled_dateOptionaldate or nullScheduled delivery date.
instructionsOptionalstring or null, max 1000Delivery instructions.
normalized_statusOptionalstringStatus code. See Reference.
failure_reasonOptionalstring or null, max 64Failure or on-hold reason code.
scheduled_delivery_dateOptionaldate or nullConfirmed scheduled delivery date.
scheduled_delivery_pendingOptionalbooleanWhether scheduled delivery is still pending.

Example Request

curl -X PATCH \
  -H "content-type: application/json" \
  -H "x-api-key: shiplah_live_xxx" \
  -d '{"normalized_status":"completed","recipient_contact":"90000000"}' \
  "https://www.shiplahsg.com/api/v1/open-api/jobs/by-marking/MARK-001"
PATCH

/jobs/batch

Updates up to 100 delivery jobs. Each item is matched by Marking Number.

Request Body

NameRequiredTypeDescription
jobsRequiredarray, 1 to 100 itemsList of update items.
jobs[].marking_numberRequiredstring, max 120Marking Number of the job to update.
jobs[].*Requiredone or more editable fieldsUse the same editable fields as PATCH /jobs/by-marking/:markingNumber.

Example Request

{
  "jobs": [
    {
      "marking_number": "MARK-001",
      "normalized_status": "completed"
    },
    {
      "marking_number": "MARK-002",
      "failure_reason": "wrong_incomplete_address"
    }
  ]
}

Response Data

{
  "updated_count": 1,
  "failed_count": 1,
  "results": [
    {
      "marking_number": "MARK-001",
      "success": true,
      "job": {}
    },
    {
      "marking_number": "MARK-002",
      "success": false,
      "error": "Delivery job not found for Marking Number"
    }
  ]
}

Job Object Fields

NameTypeDescription
idstringDelivery job id.
marking_numberstringMarking Number.
batch_numberstring or nullBatch Number.
group_codestring or nullWarehouse area or group code.
piece_quantityinteger or nullNumber of pieces.
labelsstring or nullOptional labels.
ptsnumber or nullPTS value.
weightnumber or nullWeight.
recipient_namestring or nullRecipient name.
recipient_contactstring or nullRecipient phone or contact.
delivery_addressstring or nullDelivery address.
postal_codestring or nullPostal code.
scheduled_datedate or nullScheduled delivery date.
instructionsstring or nullDelivery instructions.
normalized_statusstringPlatform status code.
failure_reasonstring or nullFailure reason code.
scheduled_delivery_datedate or nullConfirmed scheduled delivery date.
scheduled_delivery_pendingbooleanWhether scheduled delivery is still pending.
provider_statusstring or nullCurrent provider status value.
created_atdatetimeCreation timestamp.
updated_atdatetimeLast update timestamp.

Error Responses

Errors use the same response envelope with success: false.

{
  "request_id": "req_...",
  "success": false,
  "data": null,
  "error": {
    "code": "BadRequestException",
    "message": "No editable fields provided",
    "details": null
  }
}
StatusCommon Cause
400Invalid parameter format, unknown status, missing Marking Number, or no editable fields.
401Missing or invalid API key.
404No visible delivery job matched the supplied Marking Number.
500Unexpected server error.