> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.milenow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.milenow.com/_mcp/server.

# Create an FTL

POST https://lastmile.milenow.com/index.php/api/v1/partners/shipments
Content-Type: application/json

Company token. Creates one FTL. Put it on a trip in the Mile web app, or add it to an existing trip with [add stops](/ftl-trips/guides/manage-stops#add-ftls-to-a-trip) and its `shipment_id`. You can also create an FTL inside a stop when you add stops. Every problem is returned at once in `msgs`. See [create FTLs](/ftl-trips/guides/create-ftls).

Reference: https://docs.milenow.com/ftl-trips/api-reference/ftl/create-ftl

## Authentication

- `Authorization` header (bearer token, required) — Send `Authorization: Bearer <token>`. Company endpoints take the company API token from `POST /api/v1/partners/login`. `/transporters` endpoints take the transporter token from `POST /api/v1/partners/transporters/login`. You can also send the token as an `access_token` query parameter or body field.

## Request

### Body (application/json)

This endpoint expects a FtlInput.

- `shipment_no` (string, required) — Your FTL number.
- `bl_no` (string, required) — Bill of lading number.
- `created_on` (date, required) — **Pickup day**, `Y-m-d`.
- `expected_on` (date, required) — **Delivery day**, `Y-m-d`. Same day as `created_on` or later.
- `shipping_line` (string, required) — Name from [options](/ftl-trips/guides/reference-data). Or send `shipping_line_id`.
- `payment_term` (string, required) — Name from options. Or send `payment_term_id`.
- `shipping_charges` (double, required) — 0 or more.
- `other_charges` (double, required) — 0 or more.
- `customer` (PartyInput, required) — A customer (shipper) or consignee (receiver). Send `id` for an existing one, or `name` and `address` (plus `phone` for a customer) for a new one. See [customers and consignees](/ftl-trips/business-rules#customers-and-consignees).
- `consignee` (PartyInput, required) — A customer (shipper) or consignee (receiver). Send `id` for an existing one, or `name` and `address` (plus `phone` for a customer) for a new one. See [customers and consignees](/ftl-trips/business-rules#customers-and-consignees).
- `containers` (list of ContainerInput, required) — At least one container.
- `shipping_line_id` (integer, optional)
- `payment_term_id` (integer, optional)
- `pickup_from_port` (boolean, optional) — `true` to pick the container up at `destination_port` instead of the customer address. Requires `destination_port`.
- `destination_port` (string, optional) — Port name, code or UN/LOCODE from [ports](/ftl-trips/guides/reference-data#ports). Or send `destination_port_id`.
- `destination_port_id` (integer, optional)
- `origination_port` (string, optional) — Optional. Name, code or UN/LOCODE. Or `origination_port_id`.
- `origination_port_id` (integer, optional)
- `stayed_ports` (list of string, optional) — Optional transit ports, as names, codes, UN/LOCODEs or ids.
- `vendor` (string, optional) — Required only when options returns `vendor_required: true`. Or `vendor_id`.
- `vendor_id` (integer, optional)
- `vendor_category` (string, optional) — Optional. Or `vendor_category_id`.
- `vendor_category_id` (integer, optional)
- `shipping_method` (string, optional) — Optional. Or `shipping_method_id`.
- `shipping_method_id` (integer, optional)
- `country` (string, optional) — Optional country name or short name. Or `country_id`.
- `country_id` (integer, optional)
- `tracking_no` (string, optional) — Optional. Generated when empty. Must be unique.
- `documents` (list of DocumentInput, optional)
- `vessel` (string, optional)
- `voyage_no` (string, optional)
- `notes` (string, optional)
- `declared_value` (string, optional)
- `insurance_value` (string, optional)
- `shippers_reference` (string, optional)
- `consignment_reference` (string, optional)
- `pre_carriage_by` (string, optional)

## Response

### 200

Success

- `status` (integer, required)
- `msg` (string, required)
- `msgs` (list of string, required)
- `data` (Ftl, required)

## Errors

### 400 Bad Request Error

The body is not valid JSON.

- `status` (integer, required) — Same as the HTTP status code.
- `msg` (string, required) — Summary of the problem. When there are several problems it says how many.
- `msgs` (list of string, required) — Every problem found. Validation lists all problems at once, so fix them all before you retry.
- `data` (list of any, required) — Always an empty list on errors.

### 401 Unauthorized Error

Missing, invalid or expired token.

- `status` (integer, required) — Same as the HTTP status code.
- `msg` (string, required) — Summary of the problem. When there are several problems it says how many.
- `msgs` (list of string, required) — Every problem found. Validation lists all problems at once, so fix them all before you retry.
- `data` (list of any, required) — Always an empty list on errors.

### 409 Conflict Error

The same `shipment_no`, `bl_no` and container already exist.

- `status` (integer, required) — Same as the HTTP status code.
- `msg` (string, required) — Summary of the problem. When there are several problems it says how many.
- `msgs` (list of string, required) — Every problem found. Validation lists all problems at once, so fix them all before you retry.
- `data` (list of any, required) — Always an empty list on errors.

### 412 Precondition Failed Error

Validation failed. All problems are listed in `msgs`.

- `status` (integer, required) — Same as the HTTP status code.
- `msg` (string, required) — Summary of the problem. When there are several problems it says how many.
- `msgs` (list of string, required) — Every problem found. Validation lists all problems at once, so fix them all before you retry.
- `data` (list of any, required) — Always an empty list on errors.

### 429 Too Many Requests Error

Rate limit reached. Wait `Retry-After` seconds.

- `status` (integer, required) — Same as the HTTP status code.
- `msg` (string, required) — Summary of the problem. When there are several problems it says how many.
- `msgs` (list of string, required) — Every problem found. Validation lists all problems at once, so fix them all before you retry.
- `data` (list of any, required) — Always an empty list on errors.

## Types

### PartyInput

A customer (shipper) or consignee (receiver). Send `id` for an existing one, or `name` and `address` (plus `phone` for a customer) for a new one. See [customers and consignees](/ftl-trips/business-rules#customers-and-consignees).

- `id` (integer, optional) — Existing customer id: `consigner.id` or `consignee.id` from an FTL response. Not `merchant.id`. When set, the other fields are ignored.
- `name` (string, optional) — Required for a new party.
- `phone` (string, optional) — Required for a new customer (the shipper), optional for a consignee. Send it in the correct format for its country, with the country code. If the phone already belongs to a customer in your account, that customer is reused when the name matches, and the request is rejected when it does not.
- `address` (string, optional) — Required for a new party. Mile locates it with Google Maps, which sets the coordinates, locality and sub-locality.
- `latitude` (double, optional) — Fallback only, used when Google Maps cannot find the address. -90 to 90.
- `longitude` (double, optional) — Fallback only. -180 to 180.

### ContainerInput

One container. `category` (or `category_id`) and `product` (or `product_id`) are also required.

- `container_no` (string, required) — Container number. Alias: `container_id`. Must be unique within the FTL.
- `seal_no` (string, required) — Seal number. Alias: `seal_number`.
- `size` (string, required) — One of `20ft`, `40ft`, `40ft HC`, `45ft HC`. Common spellings such as `40HC`, `40 hq` or `20GP` are accepted.
- `quantity` (integer, required) — 1 to 10.
- `weight` (double, required) — 0 or more.
- `category` (string, optional) — Category name from [options](/ftl-trips/guides/reference-data), for example `Containers`. Or send `category_id`.
- `category_id` (integer, optional)
- `product` (string, optional) — Product name in that category. Exact name, or a unique part of it. Or send `product_id`.
- `product_id` (integer, optional)

### DocumentInput

Optional FTL document.

- `type` (string, optional) — Document type name from [options](/ftl-trips/guides/reference-data). Or send `type_id`.
- `type_id` (integer, optional)
- `file_name` (string, optional) — Must end in `.png`, `.jpg`, `.jpeg` or `.pdf`.
- `file_base64` (string, optional) — File content in base64, 300 KB or less after decoding. A `data:...;base64,` prefix is allowed.

### Ftl

- `id` (integer, optional) — FTL id. Use it as `shipment_id` in a stop.
- `shipment_no` (string, optional)
- `tracking_no` (string, optional)
- `bl_no` (string, optional)
- `vessel` (string, optional, nullable)
- `voyage_no` (string, optional, nullable)
- `shipping_line` (FtlShippingLine, optional, nullable)
- `status` (FtlStatus, optional, nullable) — FTL status. New FTLs are `Awaiting Approval`; a driver assignment moves them to `Local Dispatch`.
- `created_on` (string, optional, nullable) — Pickup day. Local date and time in your company time zone, `Y-m-d H:i:s`, no offset.
- `expected_on` (string, optional, nullable) — Delivery day. Local date and time in your company time zone, `Y-m-d H:i:s`, no offset.
- `merchant` (FtlMerchant, optional, nullable) — Merchant linked to the customer.
- `consigner` (Party, optional) — Customer (consigner) or consignee. On an open offer a transporter sees only `address`, `latitude` and `longitude`.
- `consignee` (Party, optional) — Customer (consigner) or consignee. On an open offer a transporter sees only `address`, `latitude` and `longitude`.
- `pickup_from_port` (boolean, optional)
- `destination_port` (FtlDestinationPort, optional, nullable)
- `warehouse` (FtlWarehouse, optional, nullable)
- `is_direct_delivery` (boolean, optional) — `true` when the FTL has no warehouse.
- `containers` (list of Container, optional)

### FtlShippingLine

- `id` (integer, optional)
- `name` (string, optional)

### FtlStatus

FTL status. New FTLs are `Awaiting Approval`; a driver assignment moves them to `Local Dispatch`.

- `id` (integer, optional)
- `name` (string, optional)

### FtlMerchant

Merchant linked to the customer.

- `id` (integer, optional)
- `short_name` (string, optional)
- `long_name` (string, optional)
- `address` (string, optional, nullable)
- `latitude` (any, optional) — Latitude. Decimal degrees. Can be a number or a numeric string.
- `longitude` (any, optional) — Longitude. Decimal degrees. Can be a number or a numeric string.

### Party

Customer (consigner) or consignee. On an open offer a transporter sees only `address`, `latitude` and `longitude`.

- `id` (integer, optional) — Customer id. Reuse it as `customer.id` or `consignee.id`.
- `name` (string, optional)
- `address` (string, optional, nullable)
- `latitude` (any, optional) — Latitude. Decimal degrees. Can be a number or a numeric string.
- `longitude` (any, optional) — Longitude. Decimal degrees. Can be a number or a numeric string.
- `contact_person_name` (string, optional, nullable)
- `contact_person_contact` (string, optional, nullable) — Phone.
- `contact_person_email` (string, optional, nullable)

### FtlDestinationPort

- `id` (integer, optional)
- `name` (string, optional)
- `unlocode` (string, optional, nullable)
- `latitude` (any, optional) — Latitude. Decimal degrees. Can be a number or a numeric string.
- `longitude` (any, optional) — Longitude. Decimal degrees. Can be a number or a numeric string.

### FtlWarehouse

- `id` (integer, optional)
- `name` (string, optional)
- `address` (string, optional, nullable)

### Container

- `id` (integer, optional)
- `container_no` (string, optional)
- `seal_no` (string, optional)
- `size` (string, optional)
- `weight` (string, optional)
- `quantity` (integer, optional)
- `category` (ContainerCategory, optional, nullable)
- `product` (ContainerProduct, optional, nullable)

### ContainerCategory

- `id` (integer, optional)
- `name` (string, optional)

### ContainerProduct

- `id` (integer, optional)
- `name` (string, optional)

## Examples

**Request**

```json
{
  "shipment_no": "SHP-1001",
  "bl_no": "BL-55001",
  "created_on": "2026-11-03",
  "expected_on": "2026-11-03",
  "shipping_line": "MAERSK",
  "payment_term": "Company Credit",
  "shipping_charges": 2200,
  "other_charges": 150,
  "customer": {
    "name": "Coastal Trading LLC",
    "phone": "+966500000000",
    "address": "Al Sulaimaniyah Industrial, Jeddah"
  },
  "consignee": {
    "name": "Coastal Trading Factory",
    "address": "South Industrial Area, Jeddah"
  },
  "containers": [
    {
      "container_no": "MSKU4821736",
      "seal_no": "SL-77120",
      "size": "40ft",
      "quantity": 1,
      "weight": 26000,
      "category": "Containers",
      "product": "40ft GP Container - Full"
    }
  ],
  "pickup_from_port": true,
  "destination_port": "SA JED",
  "vessel": "MAERSK SELETAR",
  "voyage_no": "442W"
}
```

**Response**

```json
{
  "status": 200,
  "msg": "Shipment created",
  "msgs": [],
  "data": {
    "id": 301,
    "shipment_no": "SHP-1001",
    "tracking_no": "TRK48210",
    "bl_no": "BL-55001",
    "vessel": "MAERSK SELETAR",
    "voyage_no": "442W",
    "shipping_line": {
      "id": 10,
      "name": "MAERSK"
    },
    "status": {
      "id": 10,
      "name": "Awaiting Approval"
    },
    "created_on": "2026-11-03 00:00:00",
    "expected_on": "2026-11-03 00:00:00",
    "merchant": {
      "id": 13618,
      "short_name": "Coastal Trading LLC",
      "long_name": "Coastal Trading LLC",
      "address": "Al Sulaimaniyah Industrial, Jeddah",
      "latitude": null,
      "longitude": null
    },
    "consigner": {
      "id": 7001021045,
      "name": "Coastal Trading LLC",
      "address": "Al Sulaimaniyah Industrial, Jeddah",
      "latitude": null,
      "longitude": null,
      "contact_person_name": "Coastal Trading LLC",
      "contact_person_contact": "+966500000000",
      "contact_person_email": null
    },
    "consignee": {
      "id": 7001021046,
      "name": "Coastal Trading Factory",
      "address": "South Industrial Area, Jeddah",
      "latitude": null,
      "longitude": null,
      "contact_person_name": "Coastal Trading Factory",
      "contact_person_contact": "",
      "contact_person_email": null
    },
    "pickup_from_port": true,
    "destination_port": {
      "id": 61021,
      "name": "Jiddah",
      "unlocode": "SA JED",
      "latitude": null,
      "longitude": null
    },
    "warehouse": null,
    "is_direct_delivery": true,
    "containers": [
      {
        "id": 376,
        "container_no": "MSKU4821736",
        "seal_no": "SL-77120",
        "size": "40ft",
        "weight": "26000",
        "quantity": 1,
        "category": {
          "id": 702810,
          "name": "Containers"
        },
        "product": {
          "id": 875777,
          "name": "40ft GP Container - Full"
        }
      }
    ]
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://lastmile.milenow.com/index.php/api/v1/partners/shipments"

payload = {
    "shipment_no": "SHP-1001",
    "bl_no": "BL-55001",
    "created_on": "2026-11-03",
    "expected_on": "2026-11-03",
    "shipping_line": "MAERSK",
    "payment_term": "Company Credit",
    "shipping_charges": 2200,
    "other_charges": 150,
    "customer": {
        "name": "Coastal Trading LLC",
        "phone": "+966500000000",
        "address": "Al Sulaimaniyah Industrial, Jeddah"
    },
    "consignee": {
        "name": "Coastal Trading Factory",
        "address": "South Industrial Area, Jeddah"
    },
    "containers": [
        {
            "container_no": "MSKU4821736",
            "seal_no": "SL-77120",
            "size": "40ft",
            "quantity": 1,
            "weight": 26000,
            "category": "Containers",
            "product": "40ft GP Container - Full"
        }
    ],
    "pickup_from_port": True,
    "destination_port": "SA JED",
    "vessel": "MAERSK SELETAR",
    "voyage_no": "442W"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example
const url = 'https://lastmile.milenow.com/index.php/api/v1/partners/shipments';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"shipment_no":"SHP-1001","bl_no":"BL-55001","created_on":"2026-11-03","expected_on":"2026-11-03","shipping_line":"MAERSK","payment_term":"Company Credit","shipping_charges":2200,"other_charges":150,"customer":{"name":"Coastal Trading LLC","phone":"+966500000000","address":"Al Sulaimaniyah Industrial, Jeddah"},"consignee":{"name":"Coastal Trading Factory","address":"South Industrial Area, Jeddah"},"containers":[{"container_no":"MSKU4821736","seal_no":"SL-77120","size":"40ft","quantity":1,"weight":26000,"category":"Containers","product":"40ft GP Container - Full"}],"pickup_from_port":true,"destination_port":"SA JED","vessel":"MAERSK SELETAR","voyage_no":"442W"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://lastmile.milenow.com/index.php/api/v1/partners/shipments"

	payload := strings.NewReader("{\n  \"shipment_no\": \"SHP-1001\",\n  \"bl_no\": \"BL-55001\",\n  \"created_on\": \"2026-11-03\",\n  \"expected_on\": \"2026-11-03\",\n  \"shipping_line\": \"MAERSK\",\n  \"payment_term\": \"Company Credit\",\n  \"shipping_charges\": 2200,\n  \"other_charges\": 150,\n  \"customer\": {\n    \"name\": \"Coastal Trading LLC\",\n    \"phone\": \"+966500000000\",\n    \"address\": \"Al Sulaimaniyah Industrial, Jeddah\"\n  },\n  \"consignee\": {\n    \"name\": \"Coastal Trading Factory\",\n    \"address\": \"South Industrial Area, Jeddah\"\n  },\n  \"containers\": [\n    {\n      \"container_no\": \"MSKU4821736\",\n      \"seal_no\": \"SL-77120\",\n      \"size\": \"40ft\",\n      \"quantity\": 1,\n      \"weight\": 26000,\n      \"category\": \"Containers\",\n      \"product\": \"40ft GP Container - Full\"\n    }\n  ],\n  \"pickup_from_port\": true,\n  \"destination_port\": \"SA JED\",\n  \"vessel\": \"MAERSK SELETAR\",\n  \"voyage_no\": \"442W\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://lastmile.milenow.com/index.php/api/v1/partners/shipments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"shipment_no\": \"SHP-1001\",\n  \"bl_no\": \"BL-55001\",\n  \"created_on\": \"2026-11-03\",\n  \"expected_on\": \"2026-11-03\",\n  \"shipping_line\": \"MAERSK\",\n  \"payment_term\": \"Company Credit\",\n  \"shipping_charges\": 2200,\n  \"other_charges\": 150,\n  \"customer\": {\n    \"name\": \"Coastal Trading LLC\",\n    \"phone\": \"+966500000000\",\n    \"address\": \"Al Sulaimaniyah Industrial, Jeddah\"\n  },\n  \"consignee\": {\n    \"name\": \"Coastal Trading Factory\",\n    \"address\": \"South Industrial Area, Jeddah\"\n  },\n  \"containers\": [\n    {\n      \"container_no\": \"MSKU4821736\",\n      \"seal_no\": \"SL-77120\",\n      \"size\": \"40ft\",\n      \"quantity\": 1,\n      \"weight\": 26000,\n      \"category\": \"Containers\",\n      \"product\": \"40ft GP Container - Full\"\n    }\n  ],\n  \"pickup_from_port\": true,\n  \"destination_port\": \"SA JED\",\n  \"vessel\": \"MAERSK SELETAR\",\n  \"voyage_no\": \"442W\"\n}"

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://lastmile.milenow.com/index.php/api/v1/partners/shipments")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"shipment_no\": \"SHP-1001\",\n  \"bl_no\": \"BL-55001\",\n  \"created_on\": \"2026-11-03\",\n  \"expected_on\": \"2026-11-03\",\n  \"shipping_line\": \"MAERSK\",\n  \"payment_term\": \"Company Credit\",\n  \"shipping_charges\": 2200,\n  \"other_charges\": 150,\n  \"customer\": {\n    \"name\": \"Coastal Trading LLC\",\n    \"phone\": \"+966500000000\",\n    \"address\": \"Al Sulaimaniyah Industrial, Jeddah\"\n  },\n  \"consignee\": {\n    \"name\": \"Coastal Trading Factory\",\n    \"address\": \"South Industrial Area, Jeddah\"\n  },\n  \"containers\": [\n    {\n      \"container_no\": \"MSKU4821736\",\n      \"seal_no\": \"SL-77120\",\n      \"size\": \"40ft\",\n      \"quantity\": 1,\n      \"weight\": 26000,\n      \"category\": \"Containers\",\n      \"product\": \"40ft GP Container - Full\"\n    }\n  ],\n  \"pickup_from_port\": true,\n  \"destination_port\": \"SA JED\",\n  \"vessel\": \"MAERSK SELETAR\",\n  \"voyage_no\": \"442W\"\n}")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://lastmile.milenow.com/index.php/api/v1/partners/shipments', [
  'body' => '{
  "shipment_no": "SHP-1001",
  "bl_no": "BL-55001",
  "created_on": "2026-11-03",
  "expected_on": "2026-11-03",
  "shipping_line": "MAERSK",
  "payment_term": "Company Credit",
  "shipping_charges": 2200,
  "other_charges": 150,
  "customer": {
    "name": "Coastal Trading LLC",
    "phone": "+966500000000",
    "address": "Al Sulaimaniyah Industrial, Jeddah"
  },
  "consignee": {
    "name": "Coastal Trading Factory",
    "address": "South Industrial Area, Jeddah"
  },
  "containers": [
    {
      "container_no": "MSKU4821736",
      "seal_no": "SL-77120",
      "size": "40ft",
      "quantity": 1,
      "weight": 26000,
      "category": "Containers",
      "product": "40ft GP Container - Full"
    }
  ],
  "pickup_from_port": true,
  "destination_port": "SA JED",
  "vessel": "MAERSK SELETAR",
  "voyage_no": "442W"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;

var client = new RestClient("https://lastmile.milenow.com/index.php/api/v1/partners/shipments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"shipment_no\": \"SHP-1001\",\n  \"bl_no\": \"BL-55001\",\n  \"created_on\": \"2026-11-03\",\n  \"expected_on\": \"2026-11-03\",\n  \"shipping_line\": \"MAERSK\",\n  \"payment_term\": \"Company Credit\",\n  \"shipping_charges\": 2200,\n  \"other_charges\": 150,\n  \"customer\": {\n    \"name\": \"Coastal Trading LLC\",\n    \"phone\": \"+966500000000\",\n    \"address\": \"Al Sulaimaniyah Industrial, Jeddah\"\n  },\n  \"consignee\": {\n    \"name\": \"Coastal Trading Factory\",\n    \"address\": \"South Industrial Area, Jeddah\"\n  },\n  \"containers\": [\n    {\n      \"container_no\": \"MSKU4821736\",\n      \"seal_no\": \"SL-77120\",\n      \"size\": \"40ft\",\n      \"quantity\": 1,\n      \"weight\": 26000,\n      \"category\": \"Containers\",\n      \"product\": \"40ft GP Container - Full\"\n    }\n  ],\n  \"pickup_from_port\": true,\n  \"destination_port\": \"SA JED\",\n  \"vessel\": \"MAERSK SELETAR\",\n  \"voyage_no\": \"442W\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "shipment_no": "SHP-1001",
  "bl_no": "BL-55001",
  "created_on": "2026-11-03",
  "expected_on": "2026-11-03",
  "shipping_line": "MAERSK",
  "payment_term": "Company Credit",
  "shipping_charges": 2200,
  "other_charges": 150,
  "customer": [
    "name": "Coastal Trading LLC",
    "phone": "+966500000000",
    "address": "Al Sulaimaniyah Industrial, Jeddah"
  ],
  "consignee": [
    "name": "Coastal Trading Factory",
    "address": "South Industrial Area, Jeddah"
  ],
  "containers": [
    [
      "container_no": "MSKU4821736",
      "seal_no": "SL-77120",
      "size": "40ft",
      "quantity": 1,
      "weight": 26000,
      "category": "Containers",
      "product": "40ft GP Container - Full"
    ]
  ],
  "pickup_from_port": true,
  "destination_port": "SA JED",
  "vessel": "MAERSK SELETAR",
  "voyage_no": "442W"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://lastmile.milenow.com/index.php/api/v1/partners/shipments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```