Parselv1.0.0
Shipments

Buy rate

Buy a shipping rate for a shipment and create a shipping label.

POST
/shipments/{shipment_id}/rates/{shipping_rate_id}

Authorization

authorization
AuthorizationBearer <token>

In: header

Path Parameters

shipment_id*string

Shipment ID

Formatuuid
shipping_rate_id*string

Shipping rate ID

Formatuuid

Request Body

application/json

Buy rate params

insurance_amount?number

Insurance amount in USD

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.parsel.app/shipments/123e4567-e89b-12d3-a456-426614174000/rates/123e4567-e89b-12d3-a456-426614174000" \  -H "Content-Type: application/json" \  -d '{    "insurance_amount": 100  }'
{
  "created_at": {},
  "custom_reference_1": "Custom Reference 1",
  "custom_reference_2": "Custom Reference 2",
  "destination": {
    "city": "Anytown",
    "company": "Acme Inc.",
    "country": "US",
    "email": "jane.doe@example.com",
    "name": "Jane Doe",
    "phone": "+1234567890",
    "state": "CA",
    "street1": "123 Main St",
    "zip": "12345"
  },
  "id": "02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6",
  "origin": {
    "city": "Anytown",
    "company": "Acme Inc.",
    "country": "US",
    "email": "john.doe@example.com",
    "name": "John Doe",
    "phone": "+1234567890",
    "state": "CA",
    "street1": "123 Main St",
    "zip": "12345"
  },
  "parcel": {
    "height": 10,
    "length": 10,
    "length_unit": "IN",
    "weight": 10,
    "weight_unit": "OZ",
    "width": 10
  },
  "shipping_label": {
    "created_at": {},
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "label_url": "https://example.com/labels/123.pdf",
    "shipping_rate": {
      "carrier": "UPS",
      "estimated_delivery_date": {},
      "estimated_delivery_days": 3,
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "price": {
        "amount": 10,
        "currency": "USD"
      },
      "service": "Ground",
      "rate_metadata": {
        "billable_weight": 12,
        "surcharge_metadata": {
          "surcharge": {
            "amount": 2.5,
            "currency": "USD"
          },
          "surcharge_type": "DAS"
        },
        "surcharges_metadata": [
          {
            "surcharge": {
              "amount": 2.5,
              "currency": "USD"
            },
            "surcharge_type": "DAS"
          },
          {
            "surcharge": {
              "amount": 35,
              "currency": "USD"
            },
            "surcharge_type": "HANDLING"
          }
        ],
        "usps_zone": 5,
        "weight_metadata": {
          "actual_oz_weight": 10,
          "billable_oz_weight": 12,
          "dim_factor": 166,
          "dim_threshold": 1728,
          "volume": 1000
        }
      }
    },
    "status": "PRE_TRANSIT",
    "tracking_code": "1Z999AA10123456784",
    "updated_at": {}
  },
  "shipping_rates": [
    {
      "carrier": "UPS",
      "estimated_delivery_date": {},
      "estimated_delivery_days": 3,
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "price": {
        "amount": 10,
        "currency": "USD"
      },
      "service": "Ground",
      "rate_metadata": {
        "billable_weight": 12,
        "surcharge_metadata": {
          "surcharge": {
            "amount": 2.5,
            "currency": "USD"
          },
          "surcharge_type": "DAS"
        },
        "surcharges_metadata": [
          {
            "surcharge": {
              "amount": 2.5,
              "currency": "USD"
            },
            "surcharge_type": "DAS"
          },
          {
            "surcharge": {
              "amount": 35,
              "currency": "USD"
            },
            "surcharge_type": "HANDLING"
          }
        ],
        "usps_zone": 5,
        "weight_metadata": {
          "actual_oz_weight": 10,
          "billable_oz_weight": 12,
          "dim_factor": 166,
          "dim_threshold": 1728,
          "volume": 1000
        }
      }
    },
    {
      "carrier": "USPS",
      "estimated_delivery_date": {},
      "estimated_delivery_days": 10,
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "price": {
        "amount": 10,
        "currency": "USD"
      },
      "service": "GroundAdvantage",
      "rate_metadata": {
        "billable_weight": 12,
        "surcharge_metadata": {
          "surcharge": {
            "amount": 2.5,
            "currency": "USD"
          },
          "surcharge_type": "DAS"
        },
        "surcharges_metadata": [
          {
            "surcharge": {
              "amount": 2.5,
              "currency": "USD"
            },
            "surcharge_type": "DAS"
          },
          {
            "surcharge": {
              "amount": 35,
              "currency": "USD"
            },
            "surcharge_type": "HANDLING"
          }
        ],
        "usps_zone": 5,
        "weight_metadata": {
          "actual_oz_weight": 10,
          "billable_oz_weight": 12,
          "dim_factor": 166,
          "dim_threshold": 1728,
          "volume": 1000
        }
      }
    }
  ],
  "status": "SHIPPING_LABEL_PURCHASED",
  "updated_at": {},
  "zone": 1
}
{
  "errors": {
    "message": "The requested resource could not be found",
    "status": "Not Found"
  }
}
{
  "errors": {
    "message": "The request is in conflict with the current state of the resource",
    "status": "Conflict"
  }
}
{
  "errors": {
    "message": "The request could not be processed",
    "reasons": [
      {
        "carrier": "UniUni",
        "message": "Zip code not serviced."
      }
    ],
    "status": "Unprocessable Entity"
  }
}