Purchase a Label
Overview
This guide will step you through the process of purchasing a label with the Veeqo API.
Prerequisites
To purchase a label you must have the following set up on your Veeqo account:
-
A valid order that is ready to ship. You can create/retrieve these on the
/ordersendpoint. - A payment method linked to your account. You must set this up in your Veeqo account settings.
Walk-through
We need to gather some required parameters before we can make our POST
request to the
/shipping/shipments endpoint. The table below shows you all the
required parameters to purchase a label that need to be retrieved, and where
they can be obtained from through the API. The other optional parameters that
can be included are defined within the Rate Shopping API reference.
| Parameter | Endpoint |
|---|---|
| allocation_id | /orders/(order_id) |
| remote_shipment_id | /shipping/rates |
| service_type | /shipping/rates |
| sub_carrier_id | /shipping/rates |
| service_carrier | /shipping/rates |
| total_net_charge | /shipping/rates |
| base_rate | /shipping/rates |
Order Details
In order to find the allocation_id for the order we wish to buy a label for, we made the following request:
GET https://api.veeqo.com/orders/22334455 Response:
{
"id": 22334455,
"cancel_reason": null,
"send_refund_email": null,
"cancelled_at": null,
"created_at": "2025-08-05T09:16:35.594Z",
...
"allocations": [
{
"id": 55443322,
"updated_at": "2025-08-05T09:16:36.802Z",
"created_at": "2025-08-05T09:16:35.721Z",
"total_weight": 0,
"weight_unit": "oz",
"allocated_by_id": 4444,
"order_id": 22334455,
...
}
],
...
} From this response, we will save:
-
"id": 55443322, which will be used asallocation_idlater.
Shipping Rates
After we have an allocation, we can get all the shipping rates for the allocation and choose which one we want to use. Rates that are available for use will be objects in the "available" parameter in the response.
We made the following request:
GET
https://api.veeqo.com/shipping/rates/55443322?from_allocation_package=true
Using Carrier Accounts
If you have a carrier account linked to your Veeqo account, it's possible to
request rates for that specific account by supplying the
shipping_configuration_ids[] query parameter. To find the right
Shipping Configuration ID, navigate to the Shipping carrier integrations page, find the carrier account you wish to use and click "Settings". The URL of
the Settings page will contain the numeric ID of the selected carrier
account.
Once completed, we can make a request for rates with the selected carrier account's ID:
GET
https://api.veeqo.com/shipping/rates/55443322?from_allocation_package=true&shipping_configuration_ids[]=234567
Response:
{
"available": [
{
"carrier": "amazon_shipping_v2",
"name": "amazon_shipping_v2-2295c3aa-af8c-48a0-9f19-cd84d53cbd36",
"title": "UPS 3 Day Select®",
"short_title": "UPS 3 Day Select®",
"title_with_price": "UPS 3 Day Select® - $11.80",
"total_net_charge": "11.80",
"total_gross_charge": "11.80",
"base_rate": "11.80",
"charges": [
{
"price": "$11.80",
"charge_id": "BASE_RATE",
"charge_title": "Base Rate",
"charge_type": "MANDATORY"
},
{
"price": "$5.90",
"charge_id": "SIGNATURE_CONFIRMATION",
"charge_title": "Signature confirmation",
"charge_type": "OPTIONAL"
},
{
"price": "$7.10",
"charge_id": "ADULT_SIGNATURE_CONFIRMATION",
"charge_title": "Adult signature confirmation",
"charge_type": "OPTIONAL"
}
],
"currency": "$",
"weight": "1550.9999986993",
"remote_shipment_id": "prb123abcde",
"cutoff": "2025-06-10T22:00:00+01:00",
"mailpiece_shapes": null,
"liability_amount": null,
"expected_delivery_days": 4,
"sub_carrier_id": "UPS",
"service_carrier": "ups",
"shipping_service_options": [
{
"key": "value_added_service__VAS_GROUP_ID_CONFIRMATION",
"label": "Confirmation",
"type": "select"
}
]
}
]
} From this response, we will save:
-
"remote_shipment_id": "prb123abcde", which will be used asremote_shipment_idlater. -
"name": "amazon_shipping_v2-2295c3aa-af8c-48a0-9f19-cd84d53cbd36", which will be used asservice_typelater. -
"sub_carrier_id": "UPS", which will be used assub_carrier_idlater. -
"service_carrier": "ups", which will be used asservice_carrierlater. -
"total_net_charge": "11.80", which will be used astotal_net_chargelater. -
"base_rate": "11.80", which will be used asbase_ratelater.
Since we are shipping with UPS, we will use the information from the shipments overview and use "5" as our "carrier_id".
Purchase Label
Finally, we can make our POST request in shipments to purchase the label on Veeqo:
POST https://api.veeqo.com/shipping/shipments Payload:
{
"carrier": "amazon_shipping_v2",
"shipment": {
"allocation_id": "55443322",
"carrier_id": "5",
"remote_shipment_id": "prb123abcde",
"service_type": "amazon_shipping_v2-2295c3aa-af8c-48a0-9f19-cd84d53cbd36",
"notify_customer": true,
"creation_method": "single_ship_from_orders_list",
"sub_carrier_id": "UPS",
"service_carrier": "ups",
"payment_method_id": null,
"value_added_service__VAS_GROUP_ID_CONFIRMATION\"": "DELIVERY_CONFIRMATION",
"liability_amount\"": "0.0",
"try_inbound_label\"": false,
"total_net_charge\"": "11.80",
"base_rate\"": "11.80"
}
}