Skip to content

Create Ship Via Code

Request

Create a ship via code that represents a specific combination of carrier, carrier account, parcel type, service, and special services.
This ship via code can then be used in the Create Shipment API, so users don't need to manually re-enter these parameters each time.
Once generated, the code can be reused across multiple shipments to reduce effort in shipping requests.

Security
bearerAuth
Bodyapplication/jsonrequired
codestringrequired

Unique ship via code value defined by the client.

Example:"FEDEX-custom-code1"
carrierstringrequired

Carrier name associated with the custom configuration.

Example:"FEDEX"
carrierAccountIdstringrequired

Unique identifier of the carrier account under which shipments will be processed.

Example:"xxxxxxxxxxx"
parcelTypestring

Parcel type (e.g., PKG for package, LTR for letter).

Example:"PKG"
parcelNamestring

Human-readable name for the parcel type (optional).

Example:"Package"
serviceIdstring

Identifier of the shipping service to be used.

Example:"GRD"
serviceNamestring

Human-readable name of the shipping service (optional).

Example:"Ground"
specialServicesArray of objects

List of special services applied to the ship via code.

curl -i -X POST \
  https://api-sandbox.sendpro360.pitneybowes.com/shipping/api/v1/shipviacode \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "FEDEX-custom-code1",
    "carrier": "FEDEX",
    "carrierAccountId": "xxxxxxxxxxx",
    "parcelType": "PKG",
    "parcelName": "Package",
    "serviceId": "GRD",
    "serviceName": "Ground",
    "specialServices": [
      {
        "specialServiceId": "INS",
        "inputParameters": [
          {
            "name": "INPUT_VALUE",
            "value": "101"
          }
        ],
        "fee": 0
      }
    ]
  }'

Responses

Ship Via Code successfully created.

Bodyapplication/json
codestring

The generated ship via code that can be reused in Create Shipment API.

Example:"FEDEX-custom-code1"
Response
{ "code": "FEDEX-custom-code1" }