---
title: "Create a Shipment Template"
method: POST
path: "/public/v3/ShipmentTemplates"
tags: ["ShipmentTemplates"]
---

# Create a Shipment Template

`POST /public/v3/ShipmentTemplates`

Create a shipment template within the specified account.

## Headers

- `x-tive-account-id` integer, required

## Request body

- ShipmentTemplateRequest
  - `name` string, required — The unique name of the shipment template.
  - `description` string, nullable — A description of the shipment template use case.
  - `customFields` StringStringKeyValuePair[], nullable — Custom informational field that apply to your organization. Shipments allow for up to nine custom fields.
    - `key` string, nullable
    - `value` string, nullable
  - `shipmentLegs` ShipmentLegTemplateRequest[], nullable — For Shipments that make more than one stop, multiple Legs can be created for each stop that the shipment will make.
    - `mode` string, required — The mode of transportation. Values can be `Road`, `Ocean`, `Air`, or `Rail`.
    - `carrierId` string, nullable — ID of the carrier responsible for transport of the leg.
    - `fromLocationId` integer, nullable — ID of a saved location to use as the leg origin. When provided, FromCoordinates and FromAddress must not be set. Either this ID or both FromCoordinates and FromAddress are required.
    - `fromCoordinates` CoordinateRequest — Coordinates of the location.
      - `latitude` number, double, required
      - `longitude` number, double, required
    - `fromAddress` AddressRequest — The full address of the location.
      - `street` string, required
      - `sublocality` string, nullable
      - `locality` string, required
      - `state` string, required
      - `country` string, required
      - `postalCode` string, required
    - `toLocationId` integer, nullable — ID of a saved location to use as the leg destination. When provided, ToCoordinates and ToAddress must not be set. Either this ID or both ToCoordinates and ToAddress are required.
    - `toCoordinates` CoordinateRequest — Coordinates of the location.
      - `latitude` number, double, required
      - `longitude` number, double, required
    - `toAddress` AddressRequest — The full address of the location.
      - `street` string, required
      - `sublocality` string, nullable
      - `locality` string, required
      - `state` string, required
      - `country` string, required
      - `postalCode` string, required
    - `container` string, nullable — The container ID used when the shipment leg mode is <emp>Ocean</emp>.
    - `airWaybill` string, nullable — The air waybill used when the shipment leg mode is <emp>Air</emp>.
    - `legLabel` string, nullable — The custom name of a shipment leg.
    - `alertPresetIds` integer[], nullable — A list of alert preset IDs that should trigger their respective alerts on a given shipment leg.
  - `endOfTripConfiguration` EndOfTripConfigurationRequest
    - `sendToCollaborators` boolean — Should collaborators receive end of trip report.
    - `users` string[], nullable — List of userIds for users that should receive the end of trip report.
  - `trackerStartDelay` 'ZeroMinutes' | 'ThirtyMinutes' | 'OneHour' | 'OneAndHalfHours' | 'TwoHours' | 'FourHours' — The period of time the tracker should wait before measuring or transmitting data after the start button is pressed. This is ONLY for Solo Pro Devices.
  - `commodities` integer[], nullable — List of commodity ids to attach to the shipment template.

## Response `201`

The created shipment template id

- string

## Other responses

- `400` — Unable to create the shipment template. See response message for details.
- `401` — Unauthorized

---

[API](https://skmtc.net/tive/apis/tive-public-api.md) · [All operations](https://skmtc.net/tive/apis/tive-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tive/tive-public-api/revisions/9a8d869e3cdc/schema)
