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

# Add Shipment Admin Note

POST http://localhost:9000/api/v1/shipment_admin/notes/{shipmentId}
Content-Type: application/json

Adds an admin note to a shipment. The downstream service expects Mongo shipment `_id` for this note route.

Path parameter: `shipmentId` shipment Mongo ObjectId. Required body field: `note`.

Response fields: `message`. Gateway may also queue an email using downstream `data` payload.

Possible errors:
- 400: Missing One or More Required Parameters - `note` or `noteId` missing.
- 400: Invalid Update - shipment id/note id is invalid or note is not an admin note.
- 400: Bad Shipment - archived shipment cannot be updated.
- 404: Shipment not found - shipment id was not found.
- 400: Invalid customer Id - admin customer filter is not a valid ObjectId.
- 404: Shipment not found - shipment number/id was not found.
- 400: Invalid Type/Status/Value - shipment filters or model values are outside allowed ranges.
- 400: Missing One or More Required Parameters - required body/query fields were not supplied.
- 401: Unauthorized - token is missing, expired, invalid, or the account/token pair was not found.
- 403: Access denied - gateway traffic guard/rate policy blocked the request.
- 429: Too many requests - gateway rate limit exceeded.
- 500: Unexpected Error - unhandled gateway or downstream service failure.

Reference: https://docs.mycargoextra.com/cargo-extra-gateway-api-copy/shipment-admin/notes/shipment-admin-notes-shipment-id/add-shipment-admin-note

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/shipment_admin/notes/{shipmentId}:
    post:
      operationId: add-shipment-admin-note
      summary: Add Shipment Admin Note
      description: >-
        Adds an admin note to a shipment. The downstream service expects Mongo
        shipment `_id` for this note route.


        Path parameter: `shipmentId` shipment Mongo ObjectId. Required body
        field: `note`.


        Response fields: `message`. Gateway may also queue an email using
        downstream `data` payload.


        Possible errors:

        - 400: Missing One or More Required Parameters - `note` or `noteId`
        missing.

        - 400: Invalid Update - shipment id/note id is invalid or note is not an
        admin note.

        - 400: Bad Shipment - archived shipment cannot be updated.

        - 404: Shipment not found - shipment id was not found.

        - 400: Invalid customer Id - admin customer filter is not a valid
        ObjectId.

        - 404: Shipment not found - shipment number/id was not found.

        - 400: Invalid Type/Status/Value - shipment filters or model values are
        outside allowed ranges.

        - 400: Missing One or More Required Parameters - required body/query
        fields were not supplied.

        - 401: Unauthorized - token is missing, expired, invalid, or the
        account/token pair was not found.

        - 403: Access denied - gateway traffic guard/rate policy blocked the
        request.

        - 429: Too many requests - gateway rate limit exceeded.

        - 500: Unexpected Error - unhandled gateway or downstream service
        failure.
      tags:
        - >-
          subpackage_shipmentAdmin.subpackage_shipmentAdmin/notes.subpackage_shipmentAdmin/notes/shipmentAdminNotesShipmentId
      parameters:
        - name: shipmentId
          in: path
          description: ShipmentId path parameter.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/shipment_admin_notes_shipment_admin >
                  notes > {shipmentId}_Add Shipment Admin Note_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestBadRequestError
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestForbiddenError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestNotFoundError
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1Shipment_adminNotesShipmentidRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
              required:
                - note
servers:
  - url: http://localhost:9000
    description: http://localhost:9000
components:
  schemas:
    shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_Response_200:
      type: object
      properties:
        key_0:
          type: integer
        key_1:
          type: string
        key_2:
          type: number
          format: double
        key_3:
          type: string
        key_4:
          type: boolean
      required:
        - key_0
        - key_1
        - key_2
        - key_3
        - key_4
      title: >-
        shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment
        Admin Note_Response_200
    PostApiV1Shipment_adminNotesShipmentidRequestBadRequestError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestBadRequestError
    PostApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError
    PostApiV1Shipment_adminNotesShipmentidRequestForbiddenError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestForbiddenError
    PostApiV1Shipment_adminNotesShipmentidRequestNotFoundError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestNotFoundError
    PostApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError
    PostApiV1Shipment_adminNotesShipmentidRequestInternalServerError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: PostApiV1Shipment_adminNotesShipmentidRequestInternalServerError

```

## Examples



**Request**

```json
{
  "note": "Shipment inspected and ready for next step."
}
```

**Response**

```json
{
  "key_0": 10234,
  "key_1": "Note added successfully",
  "key_2": 1587.45,
  "key_3": "adminUser123",
  "key_4": true
}
```

**SDK Code**

```python shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
import requests

url = "http://localhost:9000/api/v1/shipment_admin/notes/string"

payload = { "note": "Shipment inspected and ready for next step." }
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
const url = 'http://localhost:9000/api/v1/shipment_admin/notes/string';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"note":"Shipment inspected and ready for next step."}'
};

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

```go shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
package main

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

func main() {

	url := "http://localhost:9000/api/v1/shipment_admin/notes/string"

	payload := strings.NewReader("{\n  \"note\": \"Shipment inspected and ready for next step.\"\n}")

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

	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 shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
require 'uri'
require 'net/http'

url = URI("http://localhost:9000/api/v1/shipment_admin/notes/string")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"note\": \"Shipment inspected and ready for next step.\"\n}"

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

```java shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://localhost:9000/api/v1/shipment_admin/notes/string")
  .header("Content-Type", "application/json")
  .body("{\n  \"note\": \"Shipment inspected and ready for next step.\"\n}")
  .asString();
```

```php shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://localhost:9000/api/v1/shipment_admin/notes/string', [
  'body' => '{
  "note": "Shipment inspected and ready for next step."
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
using RestSharp;

var client = new RestClient("http://localhost:9000/api/v1/shipment_admin/notes/string");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"note\": \"Shipment inspected and ready for next step.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift shipment_admin_notes_shipment_admin > notes > {shipmentId}_Add Shipment Admin Note_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["note": "Shipment inspected and ready for next step."] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:9000/api/v1/shipment_admin/notes/string")! 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()
```