Parselv1.0.0
Network

Sort a package into a container

Sorts the scanned package into the container, which must be active. A sent `tracking_code` is used instead of the barcode. Otherwise, a sent `carrier` reads the barcode as that carrier's only.

POST
/api/containers/{id}/sort

Authorization

authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Container ID

Formatuuid

Request Body

application/json

Sort params

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.parsel.app/api/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08/sort" \  -H "Content-Type: application/json" \  -d '{    "barcode": "SPXTPA076800000061",    "carrier": "SpeedX",    "tracking_code": "SPXTPA076800000061",    "destination": {      "city": "Anytown",      "company": "Acme Inc.",      "country": "US",      "email": "john.doe@example.com",      "name": "John Doe",      "phone": "+1234567890",      "state": "CA",      "street1": "123 Main St",      "street2": "Apt 1",      "zip": "12345"    },    "origin": {      "city": "Anytown",      "company": "Acme Inc.",      "country": "US",      "email": "john.doe@example.com",      "name": "John Doe",      "phone": "+1234567890",      "state": "CA",      "street1": "123 Main St",      "street2": "Apt 1",      "zip": "12345"    },    "parcel": {      "height": 10,      "length": 10,      "length_unit": "IN",      "weight": 10,      "weight_unit": "OZ",      "width": 10    },    "shipping_rate": {      "carrier": "UPS",      "estimated_delivery_date": {},      "estimated_delivery_days": 3,      "id": "123e4567-e89b-12d3-a456-426614174000",      "price": {        "amount": 10,        "currency": "USD"      },      "rate_metadata": {        "billable_weight": 12,        "surcharge_metadata": {          "surcharge": {            "amount": 2.5,            "currency": "USD"          },          "surcharge_type": "DAS"        },        "usps_zone": 5,        "weight_metadata": {          "actual_oz_weight": 10,          "billable_oz_weight": 12,          "dim_factor": 166,          "dim_threshold": 1728,          "volume": 1000        }      },      "service": "Ground"    }  }'
{
  "data": {
    "created_at": {},
    "event_type": "SORT",
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "network_container_id": "550e8400-e29b-41d4-a716-446655440001",
    "network_location_id": "550e8400-e29b-41d4-a716-446655440000",
    "shipping_label_id": "550e8400-e29b-41d4-a716-446655440003",
    "tracking_code": "SPXTPA076800000061"
  }
}
{
  "errors": {
    "message": "The request is unauthorized",
    "status": "Unauthorized"
  }
}
{
  "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.",
        "code": "zip_not_serviced"
      }
    ],
    "status": "Unprocessable Entity"
  }
}