Purchase a shipping label and optional insurance for a shipment
| Header | Data Type | Valid Values | Required | Description |
|---|---|---|---|---|
| Content-Type | string | application/json | YES | The format your data will be sent to our site. |
| X-DevKey | string | string | YES | The devkey assigned to the developer. |
| Parameter | Data Type | Valid Values | Description |
|---|---|---|---|
| AuthToken | string | Authentication Token returned from /TransGuardian/Authenticate call | Allows access to the TransGuardian service |
| CargoType | integer |
Firearm-related Types
3 - Handguns, 4 - FirearmsNotHandguns Other Types 32 - GeneralCargoNotFragile |
Indicates the type of cargo for the shipment. |
| Carrier | integer |
3 = FedEx,
7 = UPS, 9 = USPS, 10 = USPS Flat |
Single carrier from which to purchase a shipping label |
| DeclaredValue | decimal | positive # | Optional - The declared value for purchasing insurance. Leave blank to exclude insurance from the shipment. |
| FromCompany | string | string | The company name being shipped from. Required for Carrier 7 (UPS), otherwise optional |
| FromAddress1 | string | string | The street address for the source of the package |
| FromAddress2 | string | string | The street address for the source of the package |
| FromIsBusinessAddress | boolean | true and false | Is the address for the source of the package a business? |
| FromCity | string | string | The city for the source of the package |
| FromState | string | string | The 2-digit ISO state code for the source of the package |
| FromZip | string | string | The ZIP code for the source of the package |
| FromCountry | string | string | The 2-digit ISO country code for the source of the package |
| FromPhoneNumber | string | string | Optional - The phone number for the source of the package |
| FromContact | string | string | The contact name for the source of the package |
| PackageDimX | decimal | positive # | The length of the package in inches. Required for PackageType=5 (CustomBox), otherwise optional |
| PackageDimY | decimal | positive # | The width of the package in inches. Required for PackageType=5 (CustomBox), otherwise optional |
| PackageDimZ | decimal | positive # | The height of the package in inches. Required for PackageType=5 (CustomBox), otherwise optional |
| PackageType | integer |
1 - CarrierBox,
2 - CarrierLetter, 3 - CarrierTube, 4 - CarrierPak, 5 - CustomBox, 6 - UspsFlatRateWindowedEnvelope, 7 - UspsFlatRateCardboardEnvelope, 8 - UspsFlatRateSmallEnvelope, 9 - UspsFlatRateEnvelope, 10 - UspsFlatRateLegalEnvelope, 11 - UspsFlatRatePaddedEnvelope, 12 - UspsFlatRateSmallBox, 13 - UspsFlatRateBox, 14 - UspsFlatRateLargeBox, 15 - UspsFlatRateRegionalBoxA, 16 - UspsFlatRateRegionalBoxB, 17 - UspsFlatRateApo |
The package type for the shipment |
| Service Type | integer |
1-NextDayEarlyAm,
2-NextDayAm, 3-NextDayPm, 4-TwoDayAm, 5-TwoDayPm, 6-ThirdDay, 7-GroundOrFirstClass |
The service type for the shipment |
| SignatureType | integer |
1 = None,
2 = DeliveryConfirmation, 3 = SignatureConfirmation 4 = AdultSignatureConfirmation, |
Indicates the type of signature requested for the package |
| ShipDate | datetime | Valid ISO 8601 Date format (e.g. "2017-12-18T00:00:00") | The date that the package will ship |
| ToCompany | string | string | The company name being shipped to. Required for UPS, otherwise optional. |
| ToAddress1 | string | string | The street address for the destination of the package |
| ToAddress2 | string | string | The street address for the destination of the package |
| ToIsBusinessAddress | boolean | true and false | Is the address for the destination of the package a business? |
| ToCity | string | string | The city for the destination of the package |
| ToState | string | string | The 2-digit ISO state code for the destination of the package |
| ToZip | string | string | The ZIP code for the destination of the package |
| ToCountry | string | string | The 2-digit ISO country code for the destination of the package |
| ToPhoneNumber | string | string | The phone number for the destination of the package. Required for some UPS destinations, otherwise optional |
| ToContact | string | string | The contact name for the destination of the package |
| WeightOz | decimal | positive # | The weight (in ounces) of the package |
400 BadRequest and a Message Response indicating the reason.
If the vendor returns one or more error messages, you will receive a 409 Conflict, and the list of error messages will be returned in the following structure.
If there are no errors, you will receive a 200 OK and the following structure.
| Parameter | Data Type | Valid Values | Description |
|---|---|---|---|
| ErrorCodes | Array of strings | Array of strings, or null | If applicable, an array of strings indicating vendor error codes returned. The order matches the ErrorMessages array. |
| ErrorMessages | Array of strings | Array of strings, or null | If applicable, an array of strings indicating vendor error messages. The order matches the ErrorCodes array. |
| LabelPath | string | string | The URL for the shipping label for the shipment |
| FreightPrice | decimal | On success, a positive #, Otherwise 0 | The freight portion of the shipment price |
| InsurancePrice | decimal | On success, a positive #. Otherwise 0 | The insurance portion of the shipment price, if requested |
| Price | decimal | On success, a positive #. Otherwise 0 | The total shipment price |
| ShipmentID | string | On success, a positive #. Otherwise 0 | The shipmentID for the shipment |
| TrackingNumber | string | string | The tracking number of the shipment. |
| Form1508Url | string | string | If CargoType is set to a firearm-related type and USPS is selected, the URL to USPS Form 1508 for the shipment |