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

# Validate and/or submit the fields

POST https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail
Content-Type: application/json

This endpoint will provide the ability to validate and/or submit the additional field information for a shipment

Reference: https://ups.ferndocs.com/api-reference/customs-detail/field-data/post-custom-detail-data

## Authentication

- `Authorization` header (bearer token, required) — Find your Client ID and Secret on your app info page. 1. Select "Try It" 2. In the Security section enter your Client ID and Secret 3. Select "Request Token" 4. Enter any additional information in the Body and Parameters sections 5. Select "Send" to execute your API request"
- `Authorization` header (bearer token, required) — Find your Client ID and Secret on your app info page. 1. Select "Try It" 2. In the Security section enter your Client ID and Secret 3. Select "Request Token" 4. Enter any additional information in the Body and Parameters sections 5. Select "Send" to execute your API request"
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://onlinetools.ups.com/api/trade/compliance/v2` (Production, default)
- `https://wwwcie.ups.com/api/trade/compliance/v2` (Customer Integration Environment)

## Request

### Headers

- `transId` (string, required)
- `transactionSrc` (string, required)
- `registrationId` (string, optional)

### Body (application/json)

This endpoint expects a CustomDetailsPostFieldsRequestv2.

- `actionType` (enum, required) — Specify the intent of the request. 'Save' will inherently perform validation.
  - Allowed values: `validate`, `save`
- `shipperNumber` (string, optional) — This represents the shipper account number. Required when actionType is save.
- `trackingNumber` (string, optional) — Tthe lead 1Z number fore the shipment. Required when actionType is save.
- `shipmentMetaData` (list of CustomDetailsRequestMetaDatav2Items, optional) — Unbounded list of containers for product metadata groups
- `products` (list of CustomDetailsPostFieldsRequestv2ProductsItems, optional) — Unbounded list of containers for products included on the shipment being updated

## Response

### 204

Success

## Errors

### 400 Bad Request Error

Bad Request

- `response` (CustomDetailsErrorResponsev2Response, required) — Response container to store errors

### 401 Unauthorized Error

Unauthorized

- `response` (CustomDetailsErrorResponsev2Response, required) — Response container to store errors

### 422 Unprocessable Entity Error

Unprocessable Entity

- `response` (CustomDetailsErrorResponsev2Response, required) — Response container to store errors

### 500 Internal Server Error

Server Error

- `response` (CustomDetailsErrorResponsev2Response, required) — Response container to store errors

## Types

### CustomDetailsRequestMetaDatav2Items

- `fields` (list of CustomDetailsRequestMetaDatav2ItemsFieldsItems, required) — Unbounded list of key-value pairs describing product fields
- `groupKey` (string, optional) — Field group key returned by the GET endpoint used to scope the shipment metadata payload.

### CustomDetailsPostFieldsRequestv2ProductsItems

- `productId` (string, required) — An identifier for the product
- `productDescription` (string, required) — The description of the product
- `productMetaData` (list of CustomDetailsRequestMetaDatav2Items, required) — Unbounded list of containers for product metadata groups
- `commodityCode` (string, optional) — The tariff code for the product for the selected import country and process type

### CustomDetailsErrorResponsev2Response

Response container to store errors

- `errors` (list of CustomDetailsErrorResponsev2ResponseErrorsItems, required) — Unbounded array containing one or more errors

### CustomDetailsRequestMetaDatav2ItemsFieldsItems

- `fieldKey` (string, required) — Identifier for the field.
- `fieldValue` (string, required) — Value of the field
- `regulationSections` (list of CustomDetailsRegulationSectionv2Items, optional) — Unbounded list of regulationSection definitions for this Regulation.

### CustomDetailsErrorResponsev2ResponseErrorsItems

Error entity

- `code` (string, required) — code for the given message
- `message` (string, required) — the warning or error message to be conveyed
- `description` (string, optional, nullable) — Internal description of the error
- `field` (string, optional, nullable) — The path to the field causing the error as returned from the backend services.
- `value` (string, optional, nullable) — The value that caused the error

### CustomDetailsRegulationSectionv2Items

- `sectionKey` (string, optional) — Identifier for the field. Conditionaly required when sectionName is not present.
- `sectionName` (string, optional) — Human-readable regulationSection label. Conditionally required when sectionKey is not present.

## Examples

**Request**

```json
{
  "actionType": "save",
  "shipperNumber": "1443YY",
  "trackingNumber": "1Z1443YY0161231327",
  "shipmentMetaData": [
    {
      "fields": [
        {
          "fieldKey": "ImportLicenseNumber",
          "fieldValue": "123412351234123",
          "regulationSections": [
            {
              "sectionKey": "Bio"
            }
          ]
        }
      ],
      "groupKey": "US-IMP-CDC"
    },
    {
      "fields": [
        {
          "fieldKey": "CSBType",
          "fieldValue": "3",
          "regulationSections": [
            {
              "sectionKey": "CSB"
            }
          ]
        },
        {
          "fieldKey": "IECCode",
          "fieldValue": "99",
          "regulationSections": [
            {
              "sectionKey": "CSB"
            }
          ]
        }
      ],
      "groupKey": "IN-EXP-CSB"
    }
  ],
  "products": [
    {
      "productId": "PART-001",
      "productDescription": "Medical device",
      "productMetaData": [
        {
          "fields": [
            {
              "fieldKey": "Amount",
              "fieldValue": "10",
              "regulationSections": [
                {
                  "sectionKey": "CSB"
                }
              ]
            },
            {
              "fieldKey": "CurrencyCode",
              "fieldValue": "USD",
              "regulationSections": [
                {
                  "sectionKey": "CSB"
                }
              ]
            }
          ],
          "groupKey": "IN-EXP-CSB"
        },
        {
          "fields": [
            {
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn2Te",
              "fieldValue": "Suite 400",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn3Te",
              "fieldValue": "Building C",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            }
          ],
          "groupKey": "US-IMP-FDA"
        }
      ],
      "commodityCode": "3821000010"
    },
    {
      "productId": "PART-002",
      "productDescription": "Sample pharma goods",
      "productMetaData": [
        {
          "fields": [
            {
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            }
          ],
          "groupKey": "US-IMP-FDA"
        }
      ],
      "commodityCode": "300490"
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail"

payload = {
    "actionType": "save",
    "shipperNumber": "1443YY",
    "trackingNumber": "1Z1443YY0161231327",
    "shipmentMetaData": [
        {
            "fields": [
                {
                    "fieldKey": "ImportLicenseNumber",
                    "fieldValue": "123412351234123",
                    "regulationSections": [{ "sectionKey": "Bio" }]
                }
            ],
            "groupKey": "US-IMP-CDC"
        },
        {
            "fields": [
                {
                    "fieldKey": "CSBType",
                    "fieldValue": "3",
                    "regulationSections": [{ "sectionKey": "CSB" }]
                },
                {
                    "fieldKey": "IECCode",
                    "fieldValue": "99",
                    "regulationSections": [{ "sectionKey": "CSB" }]
                }
            ],
            "groupKey": "IN-EXP-CSB"
        }
    ],
    "products": [
        {
            "productId": "PART-001",
            "productDescription": "Medical device",
            "productMetaData": [
                {
                    "fields": [
                        {
                            "fieldKey": "Amount",
                            "fieldValue": "10",
                            "regulationSections": [{ "sectionKey": "CSB" }]
                        },
                        {
                            "fieldKey": "CurrencyCode",
                            "fieldValue": "USD",
                            "regulationSections": [{ "sectionKey": "CSB" }]
                        }
                    ],
                    "groupKey": "IN-EXP-CSB"
                },
                {
                    "fields": [
                        {
                            "fieldKey": "MnuNa",
                            "fieldValue": "UPS Labs",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuAdLn1Te",
                            "fieldValue": "55 Glenlake Pkwy NE",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuAdLn2Te",
                            "fieldValue": "Suite 400",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuAdLn3Te",
                            "fieldValue": "Building C",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuCtyNa",
                            "fieldValue": "Atlanta",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuStPrvCd",
                            "fieldValue": "GA",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuCtyCd",
                            "fieldValue": "US",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        },
                        {
                            "fieldKey": "MnuPslCd",
                            "fieldValue": "30301",
                            "regulationSections": [{ "sectionKey": "Cos" }, { "sectionKey": "Bio" }, { "sectionKey": "Dev" }, { "sectionKey": "Foo" }]
                        }
                    ],
                    "groupKey": "US-IMP-FDA"
                }
            ],
            "commodityCode": "3821000010"
        },
        {
            "productId": "PART-002",
            "productDescription": "Sample pharma goods",
            "productMetaData": [
                {
                    "fields": [
                        {
                            "fieldKey": "MnuNa",
                            "fieldValue": "UPS Labs",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        },
                        {
                            "fieldKey": "MnuPslCd",
                            "fieldValue": "30301",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        },
                        {
                            "fieldKey": "MnuAdLn1Te",
                            "fieldValue": "55 Glenlake Pkwy NE",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        },
                        {
                            "fieldKey": "MnuCtyNa",
                            "fieldValue": "Atlanta",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        },
                        {
                            "fieldKey": "MnuStPrvCd",
                            "fieldValue": "GA",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        },
                        {
                            "fieldKey": "MnuCtyCd",
                            "fieldValue": "US",
                            "regulationSections": [{ "sectionKey": "Cos" }]
                        }
                    ],
                    "groupKey": "US-IMP-FDA"
                }
            ],
            "commodityCode": "300490"
        }
    ]
}
headers = {
    "transId": "transId",
    "transactionSrc": "transactionSrc",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail';
const options = {
  method: 'POST',
  headers: {
    transId: 'transId',
    transactionSrc: 'transactionSrc',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"actionType":"save","shipperNumber":"1443YY","trackingNumber":"1Z1443YY0161231327","shipmentMetaData":[{"fields":[{"fieldKey":"ImportLicenseNumber","fieldValue":"123412351234123","regulationSections":[{"sectionKey":"Bio"}]}],"groupKey":"US-IMP-CDC"},{"fields":[{"fieldKey":"CSBType","fieldValue":"3","regulationSections":[{"sectionKey":"CSB"}]},{"fieldKey":"IECCode","fieldValue":"99","regulationSections":[{"sectionKey":"CSB"}]}],"groupKey":"IN-EXP-CSB"}],"products":[{"productId":"PART-001","productDescription":"Medical device","productMetaData":[{"fields":[{"fieldKey":"Amount","fieldValue":"10","regulationSections":[{"sectionKey":"CSB"}]},{"fieldKey":"CurrencyCode","fieldValue":"USD","regulationSections":[{"sectionKey":"CSB"}]}],"groupKey":"IN-EXP-CSB"},{"fields":[{"fieldKey":"MnuNa","fieldValue":"UPS Labs","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuAdLn1Te","fieldValue":"55 Glenlake Pkwy NE","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuAdLn2Te","fieldValue":"Suite 400","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuAdLn3Te","fieldValue":"Building C","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuCtyNa","fieldValue":"Atlanta","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuStPrvCd","fieldValue":"GA","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuCtyCd","fieldValue":"US","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]},{"fieldKey":"MnuPslCd","fieldValue":"30301","regulationSections":[{"sectionKey":"Cos"},{"sectionKey":"Bio"},{"sectionKey":"Dev"},{"sectionKey":"Foo"}]}],"groupKey":"US-IMP-FDA"}],"commodityCode":"3821000010"},{"productId":"PART-002","productDescription":"Sample pharma goods","productMetaData":[{"fields":[{"fieldKey":"MnuNa","fieldValue":"UPS Labs","regulationSections":[{"sectionKey":"Cos"}]},{"fieldKey":"MnuPslCd","fieldValue":"30301","regulationSections":[{"sectionKey":"Cos"}]},{"fieldKey":"MnuAdLn1Te","fieldValue":"55 Glenlake Pkwy NE","regulationSections":[{"sectionKey":"Cos"}]},{"fieldKey":"MnuCtyNa","fieldValue":"Atlanta","regulationSections":[{"sectionKey":"Cos"}]},{"fieldKey":"MnuStPrvCd","fieldValue":"GA","regulationSections":[{"sectionKey":"Cos"}]},{"fieldKey":"MnuCtyCd","fieldValue":"US","regulationSections":[{"sectionKey":"Cos"}]}],"groupKey":"US-IMP-FDA"}],"commodityCode":"300490"}]}'
};

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 := "https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail"

	payload := strings.NewReader("{\n  \"actionType\": \"save\",\n  \"shipperNumber\": \"1443YY\",\n  \"trackingNumber\": \"1Z1443YY0161231327\",\n  \"shipmentMetaData\": [\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"ImportLicenseNumber\",\n          \"fieldValue\": \"123412351234123\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"Bio\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"US-IMP-CDC\"\n    },\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"CSBType\",\n          \"fieldValue\": \"3\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        },\n        {\n          \"fieldKey\": \"IECCode\",\n          \"fieldValue\": \"99\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"IN-EXP-CSB\"\n    }\n  ],\n  \"products\": [\n    {\n      \"productId\": \"PART-001\",\n      \"productDescription\": \"Medical device\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"Amount\",\n              \"fieldValue\": \"10\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"CurrencyCode\",\n              \"fieldValue\": \"USD\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"IN-EXP-CSB\"\n        },\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn2Te\",\n              \"fieldValue\": \"Suite 400\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn3Te\",\n              \"fieldValue\": \"Building C\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"3821000010\"\n    },\n    {\n      \"productId\": \"PART-002\",\n      \"productDescription\": \"Sample pharma goods\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"300490\"\n    }\n  ]\n}")

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

	req.Header.Add("transId", "transId")
	req.Header.Add("transactionSrc", "transactionSrc")
	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
require 'uri'
require 'net/http'

url = URI("https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail")

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

request = Net::HTTP::Post.new(url)
request["transId"] = 'transId'
request["transactionSrc"] = 'transactionSrc'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"actionType\": \"save\",\n  \"shipperNumber\": \"1443YY\",\n  \"trackingNumber\": \"1Z1443YY0161231327\",\n  \"shipmentMetaData\": [\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"ImportLicenseNumber\",\n          \"fieldValue\": \"123412351234123\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"Bio\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"US-IMP-CDC\"\n    },\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"CSBType\",\n          \"fieldValue\": \"3\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        },\n        {\n          \"fieldKey\": \"IECCode\",\n          \"fieldValue\": \"99\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"IN-EXP-CSB\"\n    }\n  ],\n  \"products\": [\n    {\n      \"productId\": \"PART-001\",\n      \"productDescription\": \"Medical device\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"Amount\",\n              \"fieldValue\": \"10\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"CurrencyCode\",\n              \"fieldValue\": \"USD\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"IN-EXP-CSB\"\n        },\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn2Te\",\n              \"fieldValue\": \"Suite 400\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn3Te\",\n              \"fieldValue\": \"Building C\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"3821000010\"\n    },\n    {\n      \"productId\": \"PART-002\",\n      \"productDescription\": \"Sample pharma goods\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"300490\"\n    }\n  ]\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.post("https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail")
  .header("transId", "transId")
  .header("transactionSrc", "transactionSrc")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"actionType\": \"save\",\n  \"shipperNumber\": \"1443YY\",\n  \"trackingNumber\": \"1Z1443YY0161231327\",\n  \"shipmentMetaData\": [\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"ImportLicenseNumber\",\n          \"fieldValue\": \"123412351234123\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"Bio\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"US-IMP-CDC\"\n    },\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"CSBType\",\n          \"fieldValue\": \"3\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        },\n        {\n          \"fieldKey\": \"IECCode\",\n          \"fieldValue\": \"99\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"IN-EXP-CSB\"\n    }\n  ],\n  \"products\": [\n    {\n      \"productId\": \"PART-001\",\n      \"productDescription\": \"Medical device\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"Amount\",\n              \"fieldValue\": \"10\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"CurrencyCode\",\n              \"fieldValue\": \"USD\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"IN-EXP-CSB\"\n        },\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn2Te\",\n              \"fieldValue\": \"Suite 400\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn3Te\",\n              \"fieldValue\": \"Building C\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"3821000010\"\n    },\n    {\n      \"productId\": \"PART-002\",\n      \"productDescription\": \"Sample pharma goods\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"300490\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail', [
  'body' => '{
  "actionType": "save",
  "shipperNumber": "1443YY",
  "trackingNumber": "1Z1443YY0161231327",
  "shipmentMetaData": [
    {
      "fields": [
        {
          "fieldKey": "ImportLicenseNumber",
          "fieldValue": "123412351234123",
          "regulationSections": [
            {
              "sectionKey": "Bio"
            }
          ]
        }
      ],
      "groupKey": "US-IMP-CDC"
    },
    {
      "fields": [
        {
          "fieldKey": "CSBType",
          "fieldValue": "3",
          "regulationSections": [
            {
              "sectionKey": "CSB"
            }
          ]
        },
        {
          "fieldKey": "IECCode",
          "fieldValue": "99",
          "regulationSections": [
            {
              "sectionKey": "CSB"
            }
          ]
        }
      ],
      "groupKey": "IN-EXP-CSB"
    }
  ],
  "products": [
    {
      "productId": "PART-001",
      "productDescription": "Medical device",
      "productMetaData": [
        {
          "fields": [
            {
              "fieldKey": "Amount",
              "fieldValue": "10",
              "regulationSections": [
                {
                  "sectionKey": "CSB"
                }
              ]
            },
            {
              "fieldKey": "CurrencyCode",
              "fieldValue": "USD",
              "regulationSections": [
                {
                  "sectionKey": "CSB"
                }
              ]
            }
          ],
          "groupKey": "IN-EXP-CSB"
        },
        {
          "fields": [
            {
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn2Te",
              "fieldValue": "Suite 400",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn3Te",
              "fieldValue": "Building C",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            },
            {
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                },
                {
                  "sectionKey": "Bio"
                },
                {
                  "sectionKey": "Dev"
                },
                {
                  "sectionKey": "Foo"
                }
              ]
            }
          ],
          "groupKey": "US-IMP-FDA"
        }
      ],
      "commodityCode": "3821000010"
    },
    {
      "productId": "PART-002",
      "productDescription": "Sample pharma goods",
      "productMetaData": [
        {
          "fields": [
            {
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            },
            {
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [
                {
                  "sectionKey": "Cos"
                }
              ]
            }
          ],
          "groupKey": "US-IMP-FDA"
        }
      ],
      "commodityCode": "300490"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'transId' => 'transId',
    'transactionSrc' => 'transactionSrc',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail");
var request = new RestRequest(Method.POST);
request.AddHeader("transId", "transId");
request.AddHeader("transactionSrc", "transactionSrc");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"actionType\": \"save\",\n  \"shipperNumber\": \"1443YY\",\n  \"trackingNumber\": \"1Z1443YY0161231327\",\n  \"shipmentMetaData\": [\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"ImportLicenseNumber\",\n          \"fieldValue\": \"123412351234123\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"Bio\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"US-IMP-CDC\"\n    },\n    {\n      \"fields\": [\n        {\n          \"fieldKey\": \"CSBType\",\n          \"fieldValue\": \"3\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        },\n        {\n          \"fieldKey\": \"IECCode\",\n          \"fieldValue\": \"99\",\n          \"regulationSections\": [\n            {\n              \"sectionKey\": \"CSB\"\n            }\n          ]\n        }\n      ],\n      \"groupKey\": \"IN-EXP-CSB\"\n    }\n  ],\n  \"products\": [\n    {\n      \"productId\": \"PART-001\",\n      \"productDescription\": \"Medical device\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"Amount\",\n              \"fieldValue\": \"10\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"CurrencyCode\",\n              \"fieldValue\": \"USD\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"CSB\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"IN-EXP-CSB\"\n        },\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn2Te\",\n              \"fieldValue\": \"Suite 400\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn3Te\",\n              \"fieldValue\": \"Building C\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                },\n                {\n                  \"sectionKey\": \"Bio\"\n                },\n                {\n                  \"sectionKey\": \"Dev\"\n                },\n                {\n                  \"sectionKey\": \"Foo\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"3821000010\"\n    },\n    {\n      \"productId\": \"PART-002\",\n      \"productDescription\": \"Sample pharma goods\",\n      \"productMetaData\": [\n        {\n          \"fields\": [\n            {\n              \"fieldKey\": \"MnuNa\",\n              \"fieldValue\": \"UPS Labs\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuPslCd\",\n              \"fieldValue\": \"30301\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuAdLn1Te\",\n              \"fieldValue\": \"55 Glenlake Pkwy NE\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyNa\",\n              \"fieldValue\": \"Atlanta\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuStPrvCd\",\n              \"fieldValue\": \"GA\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            },\n            {\n              \"fieldKey\": \"MnuCtyCd\",\n              \"fieldValue\": \"US\",\n              \"regulationSections\": [\n                {\n                  \"sectionKey\": \"Cos\"\n                }\n              ]\n            }\n          ],\n          \"groupKey\": \"US-IMP-FDA\"\n        }\n      ],\n      \"commodityCode\": \"300490\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "transId": "transId",
  "transactionSrc": "transactionSrc",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "actionType": "save",
  "shipperNumber": "1443YY",
  "trackingNumber": "1Z1443YY0161231327",
  "shipmentMetaData": [
    [
      "fields": [
        [
          "fieldKey": "ImportLicenseNumber",
          "fieldValue": "123412351234123",
          "regulationSections": [["sectionKey": "Bio"]]
        ]
      ],
      "groupKey": "US-IMP-CDC"
    ],
    [
      "fields": [
        [
          "fieldKey": "CSBType",
          "fieldValue": "3",
          "regulationSections": [["sectionKey": "CSB"]]
        ],
        [
          "fieldKey": "IECCode",
          "fieldValue": "99",
          "regulationSections": [["sectionKey": "CSB"]]
        ]
      ],
      "groupKey": "IN-EXP-CSB"
    ]
  ],
  "products": [
    [
      "productId": "PART-001",
      "productDescription": "Medical device",
      "productMetaData": [
        [
          "fields": [
            [
              "fieldKey": "Amount",
              "fieldValue": "10",
              "regulationSections": [["sectionKey": "CSB"]]
            ],
            [
              "fieldKey": "CurrencyCode",
              "fieldValue": "USD",
              "regulationSections": [["sectionKey": "CSB"]]
            ]
          ],
          "groupKey": "IN-EXP-CSB"
        ],
        [
          "fields": [
            [
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuAdLn2Te",
              "fieldValue": "Suite 400",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuAdLn3Te",
              "fieldValue": "Building C",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ],
            [
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [["sectionKey": "Cos"], ["sectionKey": "Bio"], ["sectionKey": "Dev"], ["sectionKey": "Foo"]]
            ]
          ],
          "groupKey": "US-IMP-FDA"
        ]
      ],
      "commodityCode": "3821000010"
    ],
    [
      "productId": "PART-002",
      "productDescription": "Sample pharma goods",
      "productMetaData": [
        [
          "fields": [
            [
              "fieldKey": "MnuNa",
              "fieldValue": "UPS Labs",
              "regulationSections": [["sectionKey": "Cos"]]
            ],
            [
              "fieldKey": "MnuPslCd",
              "fieldValue": "30301",
              "regulationSections": [["sectionKey": "Cos"]]
            ],
            [
              "fieldKey": "MnuAdLn1Te",
              "fieldValue": "55 Glenlake Pkwy NE",
              "regulationSections": [["sectionKey": "Cos"]]
            ],
            [
              "fieldKey": "MnuCtyNa",
              "fieldValue": "Atlanta",
              "regulationSections": [["sectionKey": "Cos"]]
            ],
            [
              "fieldKey": "MnuStPrvCd",
              "fieldValue": "GA",
              "regulationSections": [["sectionKey": "Cos"]]
            ],
            [
              "fieldKey": "MnuCtyCd",
              "fieldValue": "US",
              "regulationSections": [["sectionKey": "Cos"]]
            ]
          ],
          "groupKey": "US-IMP-FDA"
        ]
      ],
      "commodityCode": "300490"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://onlinetools.ups.com/api/trade/compliance/v2/content/fields/customs-detail")! 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()
```