Create Shipments
POST /api/v2/shipments/create
Creates one or more shipments in a single request.
reference_id is required for every shipment
and is used to correlate each shipment in the batch with the corresponding shipment
in the response.
There is currently no documented maximum batch size.
The shipments property is required and should
normally contain at least one shipment. If an empty
shipments array is submitted, Ordflow returns
an empty response rather than treating it as an error.
Request example
A complete, minimal public request:
{
"shipments": [
{
"reference_id": "ORDER-10001",
"sender": {
"address": {
"company_name": "Example Store",
"first_name": "John",
"last_name": "Seller",
"country_code": "IL",
"city": "Tel Aviv",
"first_line": "10 Example Street",
"zip_code": "6100000",
"phone_number": "+972501234567"
},
"business_number": "123456789"
},
"recipient": {
"address": {
"first_name": "Jane",
"last_name": "Customer",
"country_code": "US",
"city": "New York",
"state": "NY",
"first_line": "100 Example Avenue",
"second_line": "Apt 4B",
"zip_code": "10001",
"phone_number": "+12125551234"
}
},
"content": {
"clearance": {},
"items": [
{
"external_id": "ITEM-10001",
"title": "Cotton T-Shirt",
"sku": "TSHIRT-BLK-M",
"hs_code": "610910",
"price": {
"currency": "USD",
"amount": 29.95
},
"quantity": 1,
"weight": {
"unit": "KG",
"value": 0.25
},
"origin_country_code": "IL"
}
],
"package": {
"type": "YourPackaging",
"dimension": {
"unit": "CM",
"length": 30,
"width": 20,
"height": 5
}
}
},
"collection": {
"drop_off": "None",
"date": "2026-09-08T00:00:00Z"
},
"configuration": {
"duty": "DDU",
"purpose": "Commercial"
},
"courier": {
"courier_id": 3,
"courier_name": "FedEx",
"service": "International Priority"
}
}
]
}
Top level
| Field | Required | Description |
shipments | Yes | Array of shipments to create. No documented maximum batch size. An empty array returns an empty response. |
shipments[].reference_id | Yes | Client reference used to match each shipment with its batch response. Use a distinct reference for each shipment in the batch. |
shipments[].sender | Yes | Sender information. |
shipments[].recipient | Yes | Recipient information. |
shipments[].content | Yes | Shipment contents, customs information and package information. |
shipments[].collection | Yes | Shipment collection / drop-off information. |
shipments[].configuration | Yes | Shipment configuration. |
shipments[].courier | Yes | Courier and service selection. |
Address
The sender.address and
recipient.address objects use the same
address rules.
| Field | Required | Description |
company_name | No | Company / business name. |
first_name | Yes | First name. |
last_name | Yes | Last name. |
country_code | Yes | Country code. |
country_name | No | Country name. |
city | Yes | City. |
state | Conditional | Required for US, AU, CA, CL and BR addresses. |
first_line | Yes | Primary street address. |
second_line | No | Additional address line, apartment, suite, etc. |
zip_code | Yes | Postal / ZIP code. |
email | No | Email address. |
phone_number | Conditional | Required for express shipments. |
Sender
sender.address is required and follows the
address rules above.
| Field | Required | Description |
sender.address | Yes | Sender address. Uses the address rules above. |
sender.business_number | Yes | Sender business number. |
Recipient
recipient.address is required and follows the
address rules above.
Content
content is required and carries the customs
clearance information, the line items and the package:
"content": {
"clearance": { ... },
"items": [ ... ],
"package": { ... }
}
Clearance / IOSS
content.clearance is required. For a normal
shipment without VAT / IOSS information it may be an empty object:
"clearance": {}
VAT information is optional and should only be supplied when relevant, for
example EU shipments declared under IOSS:
"clearance": {
"vat": {
"type": "IOSS",
"value": "IM3..."
}
}
| Field | Required | Description |
clearance.vat | No | VAT reference. Supply only when applicable (for example EU IOSS shipments). |
clearance.vat.type | Yes when vat is supplied | VAT reference type. For IOSS use "IOSS". |
clearance.vat.value | Yes when vat is supplied | VAT / IOSS identifier, for example "IM3...". |
Items
content.items is required.
{
"external_id": "ITEM-10001",
"title": "Cotton T-Shirt",
"sku": "TSHIRT-BLK-M",
"hs_code": "610910",
"price": {
"currency": "USD",
"amount": 29.95
},
"quantity": 1,
"weight": {
"unit": "KG",
"value": 0.25
},
"origin_country_code": "IL"
}
| Field | Required | Description |
external_id | Yes | External / client item identifier. |
title | Yes | Item description / title. |
sku | Yes | Item SKU. |
hs_code | Yes | Customs HS code. |
price | Yes | Declared item price. |
price.currency | Yes | Currency code, e.g. "USD". |
price.amount | Yes | Monetary amount, e.g. 134.45. |
quantity | Yes | Item quantity. |
weight | Yes | Individual item weight. |
weight.unit | Yes | "GR", "KG", "LB" or "OZ". |
weight.value | Yes | Numeric weight value, e.g. 0.55. |
origin_country_code | No | Country of origin. |
Package
content.package is required.
type and
dimension are both required.
"package": {
"type": "YourPackaging",
"dimension": {
"unit": "CM",
"length": 30,
"width": 20,
"height": 5
}
}
| Field | Required | Allowed / Description |
package.type | Yes | "YourPackaging" |
package.dimension | Yes | Package dimensions. |
package.dimension.unit | Yes | "CM", "M" or "IN" |
package.dimension.length | Yes | Numeric / double length. |
package.dimension.width | Yes | Numeric / double width. |
package.dimension.height | Yes | Numeric / double height. |
Collection
collection is required. For public API
shipment creation use:
"collection": {
"drop_off": "None",
"date": "2026-09-08T00:00:00Z"
}
| Field | Required | Description |
collection.drop_off | Yes | Use "None" for API-created shipments. "CourierPickUp" exists internally but pickup requests are not currently part of this API flow. |
collection.date | Yes | Shipment / collection date as a DateTime. |
Configuration
configuration is required.
"configuration": {
"duty": "DDU",
"purpose": "Commercial"
}
| Field | Required | Allowed values / Description |
configuration.duty | Yes | "DDU" or "DDP" |
configuration.purpose | Yes | "Gift", "Commercial", "Documents", "ForRepair" or "AfterRepair" |
configuration.print | No | Omit for the default label format. Use "PDF" when A4 PDF output is requested. |
Courier
courier selects the courier and service.
Courier / service combinations have their own rules — some are direct
integrations, others are routed through an Ordflow courier-service / provider
and additionally require courier_service.
Basic shape
"courier": {
"courier_id": 3,
"courier_name": "FedEx",
"service": "International Priority"
}
Provider-backed shape
"courier": {
"courier_id": 11,
"courier_name": "Pylon",
"service": "MYNEXP",
"courier_service": {
"id": 1,
"name": "Mailog"
}
}
| Field | Required | Description |
courier_id | Yes | Ordflow courier ID. |
courier_name | Yes | Courier name. |
service | Depends on courier | Courier service name. Must match a supported value for the courier. |
courier_service | Conditional | Required when the courier is routed through an Ordflow courier-service / provider. |
Courier service providers
These provider IDs are fixed:
| ID | Name |
1 | Mailog |
2 | Israel Post |
3 | Ordflow |
- Pylon –
courier_service is required and must use { "id": 1, "name": "Mailog" }.
- BPost –
courier_service is required and must use { "id": 1, "name": "Mailog" }.
- Israel Post –
courier_service is required and must use { "id": 2, "name": "Israel Post" }.
-
Services routed through Ordflow use
{ "id": 3, "name": "Ordflow" }.
-
For a direct courier integration,
courier_service may be omitted unless that courier / service explicitly requires it.
Courier IDs
| Courier | courier_id |
| DHL | 1 |
| DHLEComm | 2 |
| FedEx | 3 |
| UPS | 4 |
| BPost | 5 |
| Showbal | 6 |
| Israel Post | 7 |
| Stamps | 8 |
| PostPlus | 9 |
| USPS | 10 |
| Pylon | 11 |
| ShipX | 12 |
| YunExpress | 13 |
| MorningGlobal | 14 |
| eHub | 15 |
| Cheetah | 2001 |
| UPS Israel | 2002 |
Known courier services
Use these service values exactly as written.
Do not use service values for couriers not listed here.
| Courier | courier_id | service |
| DHL | 1 | "Express" |
| FedEx | 3 | "International Priority" |
| FedEx | 3 | "International Economy" |
| UPS | 4 | "Express" |
| UPS | 4 | "Expedited" |
| UPS | 4 | "Saver" |
| BPost | 5 | (empty / null for standard BPost) |
| BPost | 5 | "EShipper" |
| Israel Post | 7 | "ECO post" |
| Israel Post | 7 | "EMS" |
| Stamps | 8 | "Ground Advantage" |
| Stamps | 8 | "Priority Mail Express" |
| Stamps | 8 | "Priority Mail" |
| Stamps | 8 | "Parcel Select" |
| Stamps | 8 | "First Class Mail International" |
| Stamps | 8 | "Priority Mail International" |
| Stamps | 8 | "Priority Mail Express International" |
| USPS | 10 | "Ground Advantage" |
| USPS | 10 | "Priority Mail Express" |
| USPS | 10 | "Priority Mail" |
| USPS | 10 | "Parcel Select" |
| USPS | 10 | "First Class Mail International" |
| USPS | 10 | "Priority Mail International" |
| USPS | 10 | "Priority Mail Express International" |
| Pylon | 11 | "MYNEXP" |
| Pylon | 11 | "MYPELT" |
| Pylon | 11 | "MYAMAZ" |
| Pylon | 11 | "MYUPS2" |
| Pylon | 11 | "MYUPSG" |
| Pylon | 11 | "MYBLND" |
| YunExpress | 13 | "YunExpress" |
| eHub | 15 | "Ground Advantage" |
| eHub | 15 | "Priority Mail" |
| eHub | 15 | "Priority Mail Express" |
| Cheetah | 2001 | "Home / Pickup" |
| Cheetah | 2001 | "Home" |
| Cheetah | 2001 | "Drop" |
| UPS Israel | 2002 | "Home / Pickup" |
| UPS Israel | 2002 | "Home" |
| UPS Israel | 2002 | "Drop" |
BPost + IOSS
For BPost, "EShipper" is used for EU
shipments declared under IOSS. Supply the IOSS reference in
content.clearance.vat (see
Clearance / IOSS) and route the courier through
Mailog:
{
"content": {
"clearance": {
"vat": {
"type": "IOSS",
"value": "IM3..."
}
}
},
"courier": {
"courier_id": 5,
"courier_name": "BPost",
"service": "EShipper",
"courier_service": {
"id": 1,
"name": "Mailog"
}
}
}
Israel Post example
"courier": {
"courier_id": 7,
"courier_name": "Israel Post",
"service": "EMS",
"courier_service": {
"id": 2,
"name": "Israel Post"
}
}
Pylon / Mailog example
"courier": {
"courier_id": 11,
"courier_name": "Pylon",
"service": "MYNEXP",
"courier_service": {
"id": 1,
"name": "Mailog"
}
}
Response
The response contains one result object for each shipment submitted in the
request batch. Use reference_id to
correlate each response item with the corresponding shipment in the request.
A failed shipment may return no id, no
shipment_code and no label / invoice, but
it still includes the original reference_id
and notifications that describe the failure.
Success response example
{
"shipments": [
{
"id": 123456,
"reference_id": "ORDER-10001",
"shipment_label": "<base64-label-data>",
"shipment_invoice": null,
"shipment_code": "1Z9999999999999999",
"shipment_date": "2026-09-08",
"pickup_confirmation": null,
"pickup_date": null,
"pickup_start_time": null,
"pickup_end_time": null,
"courier": {
...
},
"properties": null,
"notifications": [
{
"severity": 0,
"message": "Shipment created successfully",
"source": 2,
"Code": 0
}
]
}
]
}
The message and
Code values above are illustrative only.
Do not assume a specific message string or that
Code is 0 for every successful shipment.
Response fields
| Field | Type | Description |
shipments | array | One result for each shipment submitted in the request batch. |
shipments[].id | integer / null | Ordflow shipment ID. May be null when shipment creation fails. |
shipments[].reference_id | string | The same reference_id supplied in the request. Use it to correlate batch request and response items. |
shipments[].shipment_label | string / null | Courier label file encoded as Base64. |
shipments[].shipment_invoice | string / null | Courier invoice / customs file encoded as Base64 when available. |
shipments[].shipment_code | string / null | Courier shipment / tracking code when creation succeeds. |
shipments[].shipment_date | string / null | Shipment date returned by the courier / Ordflow. |
shipments[].pickup_confirmation | string / null | Pickup confirmation when a pickup exists. |
shipments[].pickup_date | string / null | Pickup date when applicable. |
shipments[].pickup_start_time | datetime / null | Pickup window start time when applicable. |
shipments[].pickup_end_time | datetime / null | Pickup window end time when applicable. |
shipments[].courier | object / null | Courier information returned for the shipment. |
shipments[].properties | object / null | Additional shipment or courier-specific properties returned when applicable. |
shipments[].notifications | array | Notifications associated with this individual shipment result. |
courier carries the courier information
associated with the created shipment, and
properties carries additional shipment or
courier-specific properties returned when applicable. Their exact response
structures are not documented yet and will be added once confirmed.
Base64 files
shipment_label and
shipment_invoice are byte arrays in the
backend response and are therefore serialized in JSON as Base64-encoded
strings. The file type depends on the courier.
"shipment_label": "JVBERi0xLjQK..."
Notifications
Each shipment result has its own notifications array. Inspect it for success confirmation or failure reasons.
{
"severity": 0,
"message": "Shipment created successfully",
"source": 2,
"Code": 0
}
Code uses an uppercase
C in the current public JSON contract —
document and read it exactly as Code.
| Field | Type | Description |
severity | integer | Notification severity. |
message | string | Human-readable notification message. |
source | integer | Source of the notification. |
Code | integer | Notification / error code. |
Notification severity
| Value | Name |
0 | SUCCESS |
1 | NOTE |
2 | WARNING |
3 | ERROR |
4 | FAILURE |
5 | FAILURE_ECOMMERCE |
ERROR and
FAILURE represent error conditions in the
current notification model. No further business meaning is implied beyond the
enum names.
Notification source
| Value | Name |
0 | INTERNAL |
1 | ECOMMERCE |
2 | COURIER |
Correlating batch responses
When creating multiple shipments in one request, do not rely on response
array position alone. Use reference_id to
match each response shipment with the corresponding requested shipment. This
is one of the primary reasons reference_id
is required.
Failed shipments
A failed shipment can still appear in the
shipments response array. One shipment
failing does not mean the caller should infer that the others failed —
each shipment has its own result and its own notifications. For a failed
shipment:
-
reference_id still identifies the original
request
id may be null shipment_code may be null - label / invoice may be null
-
notifications should be inspected for the
failure reason
Batch failure example
{
"shipments": [
{
"id": 123456,
"reference_id": "ORDER-10001",
"shipment_code": "1Z9999999999999999",
"notifications": [
{
"severity": 0,
"message": "Shipment created successfully",
"source": 2,
"Code": 0
}
]
},
{
"id": null,
"reference_id": "ORDER-10002",
"shipment_label": null,
"shipment_invoice": null,
"shipment_code": null,
"shipment_date": null,
"notifications": [
{
"severity": 3,
"message": "Example shipment creation error",
"source": 2,
"Code": 1000
}
]
}
]
}
The failure message and
Code (1000) above are illustrative only and are not a defined error contract.
Delete Shipments
POST /api/v2/shipments/cancel
Cancel one or more existing shipments by Ordflow shipment ID. This endpoint
supports batch cancellation.
Deleting a shipment cancels the existing Ordflow shipment and, where
applicable, its associated courier / pickup operation. It does not
permanently delete database records.
This endpoint requires the same Ordflow authentication used by the other API
endpoints — see Authentication.
Request
The request body is a JSON array of Ordflow shipment IDs. Do not wrap the
array in another object.
[
123456,
123457,
123458
]
Correct
[
123456,
123457
]
Incorrect
{
"shipment_ids": [
123456,
123457
]
}
Request field
| Field | Type | Description |
| Shipment ID | integer / int64 |
The Ordflow shipment ID returned in the Create Shipments response as
shipments[].id (for example
123456).
|
For batch cancellation, send multiple shipment IDs in the request array.
Ownership
Ordflow verifies that the requested shipments belong to the authenticated
user's current company / branch. If one or more shipments do not belong to
the authenticated branch, the API returns
403 Forbidden with an unauthorized-request
error.
Do not send CompanyId or
BranchId in the request — they are
derived from the authenticated Ordflow user / token.
Request example
POST /api/v2/shipments/cancel
Request body:
[
123456,
123457
]
Response
The endpoint returns an array of response objects. Each object has a
data value and a
notifications array:
{
"data": ...,
"notifications": [
{
"severity": 0,
"message": "...",
"source": 2,
"Code": 0
}
]
}
data is documented generically for now
because the exact cancellation payload can depend on the cancellation result.
Success response example
[
{
"data": null,
"notifications": [
{
"severity": 0,
"message": "Shipment cancelled successfully",
"source": 2,
"Code": 0
}
]
}
]
The message,
Code and
data values above are illustrative only.
Do not assume these exact values are returned — this example will be
updated after real cancellation testing.
Response fields
| Field | Type | Description |
data | object / null | Cancellation result data returned by Ordflow when applicable. |
notifications | array | Notifications associated with the cancellation result. |
Notifications
notifications uses the same contract as
the Create Shipments response. Code has an
uppercase C in the current API contract.
| Field | Type | Description |
severity | integer | Notification severity. |
message | string | Human-readable result / error message. |
source | integer | Source of the notification. |
Code | integer | Notification / error code. |
Notification severity
| Value | Name |
0 | SUCCESS |
1 | NOTE |
2 | WARNING |
3 | ERROR |
4 | FAILURE |
5 | FAILURE_ECOMMERCE |
Notification source
| Value | Name |
0 | INTERNAL |
1 | ECOMMERCE |
2 | COURIER |
Batch behavior
Multiple shipment IDs can be submitted in one request. The API performs
cancellation through Ordflow's shipment / pickup cancellation process and
returns the cancellation response data and notifications. No maximum number
of shipment IDs is defined yet.
HTTP status codes
| Status | Description |
200 OK | Cancellation request processed. The response contains cancellation result objects. |
403 Forbidden | One or more requested shipments do not belong to the authenticated branch. |
500 Internal Server Error | Unexpected server error. |
Relationship to Create Shipments
The IDs supplied to Delete Shipments are the
id values returned by
Create Shipments.
Create response:
{
"id": 123456,
"reference_id": "ORDER-10001"
}
Delete / cancel request:
[
123456
]
Errors
Ordflow APIs can report errors at two levels:
- HTTP errors indicate that the request itself could not be
processed.
- Operation notifications describe the result of an
individual shipment operation.
For batch operations, some shipments may succeed while others fail.
A 200 OK response does not necessarily
mean that every shipment in the batch was successful. Always inspect the
notifications array for each shipment
result, and use reference_id to correlate
each response item with the original shipment in the request.
HTTP errors
HTTP status codes describe whether the overall API request could be
processed.
| Status | Meaning |
200 OK | The request was processed. Individual operations may still contain errors in notifications. |
401 Unauthorized | Authentication is missing or invalid. |
403 Forbidden | The authenticated user is not allowed to access the requested resource. |
500 Internal Server Error | An unexpected server error occurred. |
Operation notifications
Shipment operations return a notifications
array. Each notification contains:
{
"severity": 3,
"message": "Example error message",
"source": 2,
"Code": 1000
}
The message and
Code above are examples only — they
are not documented Ordflow error codes.
The JSON property is Code with an
uppercase C. Read it exactly this way.
| Field | Type | Description |
severity | integer | Notification severity. |
message | string | Human-readable result or error message. |
source | integer | Source of the notification. |
Code | integer | Ordflow / courier notification code. |
Severity
| Value | Name |
0 | SUCCESS |
1 | NOTE |
2 | WARNING |
3 | ERROR |
4 | FAILURE |
5 | FAILURE_ECOMMERCE |
ERROR and
FAILURE indicate unsuccessful operation
results. No further meaning is implied beyond the enum names.
Source
| Value | Name |
0 | INTERNAL |
1 | ECOMMERCE |
2 | COURIER |
Batch example
One successful shipment and one failed shipment in the same response. The
notification messages and codes are illustrative examples only.
{
"shipments": [
{
"id": 123456,
"reference_id": "ORDER-10001",
"notifications": [
{
"severity": 0,
"message": "Example success message",
"source": 2,
"Code": 0
}
]
},
{
"id": null,
"reference_id": "ORDER-10002",
"notifications": [
{
"severity": 3,
"message": "Example shipment error",
"source": 2,
"Code": 1000
}
]
}
]
}
This example shows that:
- the HTTP request can succeed while individual results differ
- each shipment result must be checked separately
-
reference_id identifies which requested
shipment the result belongs to
Handling responses
For batch shipment operations:
- Check the HTTP status first.
- If the request was processed, inspect each result individually.
-
Use
reference_id to match the result to
the submitted shipment.
- Inspect
notifications. -
Treat
ERROR or
FAILURE notifications as unsuccessful
shipment operations.