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

# 1. Create new shipment

POST https://v1/shipments
Content-Type: application/json

## SHIPMENT STRUCTURE

<table><tbody><tr><td><div><p><b>Parameter</b></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Type</b></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Description</b></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Mandatory? Yes/ No</b></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Constraints</b></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>documentType</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Type of the shipment document</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Possible values:<br>MAWB,<br>HAWB,<br>CMR</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>externalClientId</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>External system client ID shared with the platform</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>No</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>When not set then the caller needs to be registered as client</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>documentNumber</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Number of the shipment document</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Format for airwaybill shipment number:</p><p>XXX-XXXXXXXX</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>masterNumber</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>MAWB number for HAWB shipment</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes, for house_airwaybill shipment</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Format:</p><p>XXX-XXXXXXXX</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>flightNumber</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Flightnumber + flight date</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes, for airwaybill and house_airwaybill shipment</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Expected Format:</p><p>AY1234/20NOV25</p><p></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>charter</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Boolean</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Is it charter flight?</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>No</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Possible values:</p><p>true,<br>false,<br>null</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>airport</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Entryairport</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes, for airwaybill and house_airwaybill shipment</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Airport IATA code. Should be supported by the system. For OTP entry use "OTP".</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>operatorSiteCode</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Specifies operator site code based on agreement with operator.</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Yes</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Site code "OTP"</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>arriveDate</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Time of Arrival</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1. Format: 2025-11-27T15:00:00Z</p><p></p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>shipmentPieces</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Integer</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Shipment Packages Count</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1.&nbsp;shipmentPieces &gt; 0</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>shipmentWeight</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Number</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Shipment total weight, in KG-s</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1.&nbsp;shipmentWeight &gt; 0</p><p>2. Max 3 decimals</p></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>

Reference: https://api.leanmile.com/otp-cc-flow/1-shipments/1-create-new-shipment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OTP CC Flow
  version: 1.0.0
paths:
  /v1/shipments:
    post:
      operationId: 1-create-new-shipment
      summary: 1. Create new shipment
      description: >-
        ## SHIPMENT STRUCTURE


        <table><tbody><tr><td><div><p><b>Parameter</b></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Type</b></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Description</b></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Mandatory?
        Yes/ No</b></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p><b>Constraints</b></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>documentType</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Type
        of the shipment document</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Possible
        values:<br>MAWB,<br>HAWB,<br>CMR</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>externalClientId</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>External
        system client ID shared with the platform</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>No</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>When
        not set then the caller needs to be registered as client</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>documentNumber</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Number
        of the shipment document</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Format
        for airwaybill shipment number:</p><p>XXX-XXXXXXXX</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>masterNumber</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>MAWB
        number for HAWB shipment</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes,
        for house_airwaybill shipment</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Format:</p><p>XXX-XXXXXXXX</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>flightNumber</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Flightnumber
        + flight date</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes,
        for airwaybill and house_airwaybill shipment</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Expected
        Format:</p><p>AY1234/20NOV25</p><p></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>charter</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Boolean</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Is
        it charter flight?</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>No</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Possible
        values:</p><p>true,<br>false,<br>null</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>airport</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Entryairport</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes,
        for airwaybill and house_airwaybill shipment</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Airport
        IATA code. Should be supported by the system. For OTP entry use
        "OTP".</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>operatorSiteCode</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Specifies
        operator site code based on agreement with operator.</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Yes</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Site
        code "OTP"</div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>arriveDate</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>String</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Time
        of Arrival</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1.
        Format: 2025-11-27T15:00:00Z</p><p></p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>shipmentPieces</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Integer</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Shipment
        Packages Count</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1.&nbsp;shipmentPieces
        &gt; 0</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><p>shipmentWeight</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Number</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Shipment
        total weight, in KG-s</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>Yes</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>1.&nbsp;shipmentWeight
        &gt; 0</p><p>2. Max 3 decimals</p></div><div
        contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>
      tags:
        - subpackage_1Shipments
      parameters:
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/1. Shipments_1. Create new
                  shipment_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV1ShipmentsRequestBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV1ShipmentsRequestUnauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV1ShipmentsRequestInternalServerError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                airport:
                  type: string
                charter:
                  type: boolean
                arriveDate:
                  type: string
                  format: date-time
                documentType:
                  type: string
                flightNumber:
                  type: string
                documentNumber:
                  type: string
                shipmentPieces:
                  type: integer
                shipmentWeight:
                  type: number
                  format: double
                operatorSiteCode:
                  type: string
              required:
                - airport
                - charter
                - arriveDate
                - documentType
                - flightNumber
                - documentNumber
                - shipmentPieces
                - shipmentWeight
                - operatorSiteCode
servers:
  - url: https:/
    description: https://{baseurl}
components:
  schemas:
    V1ShipmentsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties: {}
      title: V1ShipmentsPostResponsesContentApplicationJsonSchemaData
    1. Shipments_1. Create new shipment_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1ShipmentsPostResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: integer
      required:
        - data
        - status
        - message
        - statusCode
      title: 1. Shipments_1. Create new shipment_Response_200
    PostV1ShipmentsRequestBadRequestError:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1ShipmentsPostResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: integer
      required:
        - data
        - status
        - message
        - statusCode
      title: PostV1ShipmentsRequestBadRequestError
    PostV1ShipmentsRequestUnauthorizedError:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1ShipmentsPostResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: integer
      required:
        - data
        - status
        - message
        - statusCode
      title: PostV1ShipmentsRequestUnauthorizedError
    PostV1ShipmentsRequestInternalServerError:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1ShipmentsPostResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: integer
      required:
        - data
        - status
        - message
        - statusCode
      title: PostV1ShipmentsRequestInternalServerError
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

```

## Examples



**Request**

```json
{
  "airport": "OTP",
  "charter": false,
  "arriveDate": "2025-11-27T15:00:00Z",
  "documentType": "MAWB",
  "flightNumber": "AY1234/24NOV25",
  "documentNumber": "123-00000000",
  "shipmentPieces": 6,
  "shipmentWeight": 10.5,
  "operatorSiteCode": "OTP"
}
```

**Response**

```json
{
  "data": {
    "id": 12332,
    "hub": "OTP",
    "ref": "shipment/12332",
    "airport": "OTP",
    "charter": false,
    "arriveDate": "2025-11-27T15:00:00Z",
    "documentType": "MAWB",
    "flightNumber": "AY1234/24NOV25",
    "documentNumber": "123-00000000",
    "shipmentPieces": 6,
    "shipmentWeight": 10.5
  },
  "status": "OK",
  "message": "Shipment created successfully",
  "statusCode": 200
}
```

**SDK Code**

```python 1. Shipments_1. Create new shipment_example
import requests

url = "https://https/v1/shipments"

payload = {
    "airport": "OTP",
    "charter": False,
    "arriveDate": "2025-11-27T15:00:00Z",
    "documentType": "MAWB",
    "flightNumber": "AY1234/24NOV25",
    "documentNumber": "123-00000000",
    "shipmentPieces": 6,
    "shipmentWeight": 10.5,
    "operatorSiteCode": "OTP"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript 1. Shipments_1. Create new shipment_example
const url = 'https://https/v1/shipments';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"airport":"OTP","charter":false,"arriveDate":"2025-11-27T15:00:00Z","documentType":"MAWB","flightNumber":"AY1234/24NOV25","documentNumber":"123-00000000","shipmentPieces":6,"shipmentWeight":10.5,"operatorSiteCode":"OTP"}'
};

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

```go 1. Shipments_1. Create new shipment_example
package main

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

func main() {

	url := "https://https/v1/shipments"

	payload := strings.NewReader("{\n  \"airport\": \"OTP\",\n  \"charter\": false,\n  \"arriveDate\": \"2025-11-27T15:00:00Z\",\n  \"documentType\": \"MAWB\",\n  \"flightNumber\": \"AY1234/24NOV25\",\n  \"documentNumber\": \"123-00000000\",\n  \"shipmentPieces\": 6,\n  \"shipmentWeight\": 10.5,\n  \"operatorSiteCode\": \"OTP\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	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 1. Shipments_1. Create new shipment_example
require 'uri'
require 'net/http'

url = URI("https://https/v1/shipments")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"airport\": \"OTP\",\n  \"charter\": false,\n  \"arriveDate\": \"2025-11-27T15:00:00Z\",\n  \"documentType\": \"MAWB\",\n  \"flightNumber\": \"AY1234/24NOV25\",\n  \"documentNumber\": \"123-00000000\",\n  \"shipmentPieces\": 6,\n  \"shipmentWeight\": 10.5,\n  \"operatorSiteCode\": \"OTP\"\n}"

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

```java 1. Shipments_1. Create new shipment_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/v1/shipments")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"airport\": \"OTP\",\n  \"charter\": false,\n  \"arriveDate\": \"2025-11-27T15:00:00Z\",\n  \"documentType\": \"MAWB\",\n  \"flightNumber\": \"AY1234/24NOV25\",\n  \"documentNumber\": \"123-00000000\",\n  \"shipmentPieces\": 6,\n  \"shipmentWeight\": 10.5,\n  \"operatorSiteCode\": \"OTP\"\n}")
  .asString();
```

```php 1. Shipments_1. Create new shipment_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/v1/shipments', [
  'body' => '{
  "airport": "OTP",
  "charter": false,
  "arriveDate": "2025-11-27T15:00:00Z",
  "documentType": "MAWB",
  "flightNumber": "AY1234/24NOV25",
  "documentNumber": "123-00000000",
  "shipmentPieces": 6,
  "shipmentWeight": 10.5,
  "operatorSiteCode": "OTP"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp 1. Shipments_1. Create new shipment_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://https/v1/shipments");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"airport\": \"OTP\",\n  \"charter\": false,\n  \"arriveDate\": \"2025-11-27T15:00:00Z\",\n  \"documentType\": \"MAWB\",\n  \"flightNumber\": \"AY1234/24NOV25\",\n  \"documentNumber\": \"123-00000000\",\n  \"shipmentPieces\": 6,\n  \"shipmentWeight\": 10.5,\n  \"operatorSiteCode\": \"OTP\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 1. Shipments_1. Create new shipment_example
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "airport": "OTP",
  "charter": false,
  "arriveDate": "2025-11-27T15:00:00Z",
  "documentType": "MAWB",
  "flightNumber": "AY1234/24NOV25",
  "documentNumber": "123-00000000",
  "shipmentPieces": 6,
  "shipmentWeight": 10.5,
  "operatorSiteCode": "OTP"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/v1/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()
```