Parselv1.0.0
Shipments

Import shipments

Bring up to 500 shipments created outside Parsel into Parsel, where they are managed like any other shipment. The response lists every tracking code under what became of it: imported, skipped because it is already present in Parsel, or rejected with a reason. A skipped code is left unchanged, so a request can safely be sent again.

POST
/shipments/imports

Authorization

authorization
AuthorizationBearer <token>

In: header

Request Body

application/json

Shipments to import

Response Body

application/json

application/json

application/json

curl -X POST "https://api.parsel.app/shipments/imports" \  -H "Content-Type: application/json" \  -d '{    "shipments": [      {        "carrier": "UPS",        "destination": {          "city": "New York",          "country": "US",          "name": "Jane Doe",          "state": "NY",          "street1": "10 Main St",          "zip": "10001"        },        "origin": {          "city": "Miami",          "country": "US",          "name": "Acme",          "state": "FL",          "street1": "1 Warehouse Way",          "zip": "33166"        },        "tracking_code": "1Z999AA10123456784",        "parcel": {          "height": 10,          "length": 10,          "length_unit": "IN",          "weight": 10,          "weight_unit": "OZ",          "width": 10        }      }    ]  }'
{
  "data": {
    "1Z999AA10123456784": {
      "shipment_id": "5f0c8a2e-3b1d-4c7a-9e2f-1a6b8d4c3e21"
    }
  },
  "rejected": {
    "unsupported_carrier": [
      "SPX0000000001"
    ]
  },
  "skipped": [
    "1Z999AA10987654321"
  ],
  "summary": {
    "imported": 1,
    "rejected": 1,
    "skipped": 1,
    "total_requested": 3
  }
}
{
  "errors": {
    "message": "This action requires the WRITE_SHIPMENTS scope",
    "required_scope": "WRITE_SHIPMENTS",
    "status": "Forbidden"
  }
}
{
  "errors": {
    "message": "The request could not be processed",
    "reasons": [
      {
        "carrier": "UniUni",
        "message": "Zip code not serviced.",
        "code": "zip_not_serviced"
      }
    ],
    "status": "Unprocessable Entity"
  }
}
Empty