> 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.

# Delete Shipment Admin Note

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

Deletes an admin note from a shipment. The downstream service expects Mongo shipment `_id` and note `_id`.

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

Response: HTTP 204 on success.

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/delete-shipment-admin-note

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/shipment_admin/notes/{shipmentId}:
    delete:
      operationId: delete-shipment-admin-note
      summary: Delete Shipment Admin Note
      description: >-
        Deletes an admin note from a shipment. The downstream service expects
        Mongo shipment `_id` and note `_id`.


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


        Response: HTTP 204 on success.


        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:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestBadRequestError
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestForbiddenError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestNotFoundError
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DeleteApiV1Shipment_adminNotesShipmentidRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                noteId:
                  type: string
              required:
                - noteId
servers:
  - url: http://localhost:9000
    description: http://localhost:9000
components:
  schemas:
    DeleteApiV1Shipment_adminNotesShipmentidRequestBadRequestError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestBadRequestError
    DeleteApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestUnauthorizedError
    DeleteApiV1Shipment_adminNotesShipmentidRequestForbiddenError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestForbiddenError
    DeleteApiV1Shipment_adminNotesShipmentidRequestNotFoundError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestNotFoundError
    DeleteApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestTooManyRequestsError
    DeleteApiV1Shipment_adminNotesShipmentidRequestInternalServerError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: DeleteApiV1Shipment_adminNotesShipmentidRequestInternalServerError

```

## Examples



**Request**

```json
{
  "noteId": "64f000000000000000000003"
}
```

**SDK Code**

```python
import requests

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

payload = { "noteId": "64f000000000000000000003" }
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript
const url = 'http://localhost:9000/api/v1/shipment_admin/notes/string';
const options = {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json'},
  body: '{"noteId":"64f000000000000000000003"}'
};

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

```go
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"noteId\": \"64f000000000000000000003\"\n}")

	req, _ := http.NewRequest("DELETE", 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
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::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"noteId\": \"64f000000000000000000003\"\n}"

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

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

HttpResponse<String> response = Unirest.delete("http://localhost:9000/api/v1/shipment_admin/notes/string")
  .header("Content-Type", "application/json")
  .body("{\n  \"noteId\": \"64f000000000000000000003\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'http://localhost:9000/api/v1/shipment_admin/notes/string', [
  'body' => '{
  "noteId": "64f000000000000000000003"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("http://localhost:9000/api/v1/shipment_admin/notes/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"noteId\": \"64f000000000000000000003\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["noteId": "64f000000000000000000003"] 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 = "DELETE"
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()
```