parcels

Create new parcels.

Create one or more parcels to be shipped. Note that creating a parcel does not trigger a delivery — you must call /v1/parcels/ship afterwards to schedule the pickup.

Each parcel requires a pickup and a drop-off location. You can provide a location using at least one of the following fields in the pickup_info or dropoff_info schemas: loc (coordinates), addr (address string), or hub_external_id (reference to a registered hub). They may be combined; coordinates take precedence.

post/v1/parcels

Request

  • Base URL
    https://logistics.api.cabify-sandbox.com
  • URL
    https://logistics.api.cabify-sandbox.com/v1/parcels
  • Auth
    HTTP bearer

Request body

Example request

{
  "parcels": [
    {
      "external_id": "parcel_001",
      "pickup_info": {
        "addr": "Calle de Pradillo, 42, Madrid",
        "contact": {
          "name": "John",
          "phone": "+34666000000"
        },
        "instr": "Knock the door three times",
        "loc": {
          "lat": 40.4489254,
          "lon": -3.6730293
        },
        "code": "ABC123",
        "hub_external_id": "magic_store_santa_fe"
      },
      "dropoff_info": {
        "addr": "Calle de Pradillo, 42, Madrid",
        "contact": {
          "name": "John",
          "phone": "+34666000000"
        },
        "instr": "Knock the door three times",
        "loc": {
          "lat": 40.4489254,
          "lon": -3.6730293
        },
        "hub_external_id": "magic_store_santa_fe"
      },
      "dimensions": {
        "height": 10,
        "length": 10,
        "width": 10
      },
      "weight": {
        "value": 1500
      },
      "price": {
        "declared_value": 630,
        "collected_value": 630,
        "currency": "EUR"
      },
      "delivery_from": "2021-12-02T10:12:07.753Z",
      "delivery_to": "2021-12-02T10:12:07.753Z"
    }
  ]
}

Response

Success

Example response

{
  "parcels": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "external_id": "parcel_001",
      "state": "delivered",
      "pickup_info": {
        "addr": "Calle de Pradillo, 42, Madrid",
        "contact": {
          "name": "John",
          "phone": "+34666000000"
        },
        "instr": "Knock the door three times",
        "loc": {
          "lat": 40.4489254,
          "lon": -3.6730293
        },
        "code": "ABC123",
        "hub_external_id": "magic_store_santa_fe"
      },
      "dropoff_info": {
        "addr": "Calle de Pradillo, 42, Madrid",
        "contact": {
          "name": "John",
          "phone": "+34666000000"
        },
        "instr": "Knock the door three times",
        "loc": {
          "lat": 40.4489254,
          "lon": -3.6730293
        },
        "hub_external_id": "magic_store_santa_fe"
      },
      "dimensions": {
        "height": 10,
        "length": 10,
        "width": 10
      },
      "weight": {
        "value": 1500
      },
      "price": {
        "declared_value": 630,
        "collected_value": 630,
        "currency": "EUR"
      },
      "delivery_from": "2021-12-02T10:00:00Z",
      "delivery_to": "2021-12-02T14:00:00Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.