Back to siteAPI Documentation
POST

/api/v1/quotes

Auth: Bearer token

Request Quote

Submit shipment dimensions and route details to receive one or more carrier quote options.

Body parameters

NameTypeRequiredDescription
merchant_idstringYesMerchant UUID requesting the quote.
merchant_order_refstringNoOptional merchant order reference.
collection_datestringNoRequested collection datetime in ISO-8601 format.
pickup_addressobjectYesOrigin address object.
pickup_address.namestringNoPickup location name.
pickup_address.codestringNoPickup address code.
pickup_address.companystringNoPickup company name.
pickup_address.address_line_1stringYesPrimary pickup street line.
pickup_address.address_line_2stringNoSecondary pickup street line.
pickup_address.townstringNoPickup town/suburb.
pickup_address.citystringYesPickup city.
pickup_address.provincestringNoPickup province/state.
pickup_address.post_codestringNoPickup postal code.
pickup_address.countrystringYesTwo-letter country code.
pickup_address.first_namestringNoPickup contact first name.
pickup_address.last_namestringNoPickup contact last name.
pickup_address.phonestringNoPickup contact phone number.
pickup_address.latitudenumberNoPickup latitude.
pickup_address.longitudenumberNoPickup longitude.
pickup_address.google_place_idstringNoGoogle place identifier.
dropoff_addressobjectYesDestination address object.
dropoff_address.namestringNoDropoff location name.
dropoff_address.codestringNoDropoff address code.
dropoff_address.companystringNoDropoff company name.
dropoff_address.address_line_1stringYesPrimary dropoff street line.
dropoff_address.address_line_2stringNoSecondary dropoff street line.
dropoff_address.townstringNoDropoff town/suburb.
dropoff_address.citystringYesDropoff city.
dropoff_address.provincestringNoDropoff province/state.
dropoff_address.post_codestringNoDropoff postal code.
dropoff_address.countrystringYesTwo-letter country code.
dropoff_address.first_namestringNoDropoff contact first name.
dropoff_address.last_namestringNoDropoff contact last name.
dropoff_address.phonestringNoDropoff contact phone number.
dropoff_address.latitudenumberNoDropoff latitude.
dropoff_address.longitudenumberNoDropoff longitude.
dropoff_address.google_place_idstringNoGoogle place identifier.
parcelsarrayYesParcel items in this quote request.
parcels[].titlestringNoParcel label/title.
parcels[].weight_kgnumberYesParcel weight in kilograms.
parcels[].length_cmnumberYesParcel length in centimeters.
parcels[].width_cmnumberYesParcel width in centimeters.
parcels[].height_cmnumberYesParcel height in centimeters.

Example response

<?php

return [
  'success' => true,
  'data' => [
    'quote_id' => 'quote_123',
    'merchant_order_ref' => 'ORD-8842',
    'merchant_id' => 'mrc_001',
    'environment_id' => 'env_live_001',
    'shipment_id' => 'shp_101',
    'status' => 'pending',
    'requested_at' => '2026-02-17T10:22:00Z',
    'expires_at' => '2026-02-17T11:22:00Z',
    'options' => [
      [
        'quote_option_id' => 'qopt_001',
        'carrier_code' => 'fastship',
        'service_code' => 'next_day',
        'currency' => 'ZAR',
        'amount' => '225.00',
        'tax_amount' => '33.75',
        'total_amount' => '258.75',
        'eta_from' => '2026-02-18T08:00:00Z',
        'eta_to' => '2026-02-18T17:00:00Z',
        'rules' => [
          'max_weight_kg' => 25
        ]
      ]
    ],
    'selected_option' => null
  ]
];

Request examples

curl -X POST \
  "https://api.spaces.za.com/api/v1/quotes" \
  -H "Authorization: Bearer <token>" \\
  -H "Content-Type: application/json" \\
  --data '{
  "merchant_id": "mrc_001",
  "merchant_order_ref": "ORD-8842",
  "collection_date": "2026-02-18T09:00:00Z",
  "pickup_address": {
    "name": "Warehouse A",
    "code": "WH-A",
    "company": "PicknDrop",
    "address_line_1": "60 Newline Road",
    "address_line_2": "Sunningdale",
    "town": "Sunningdale",
    "city": "Cape Town",
    "province": "Western Cape",
    "post_code": "7441",
    "country": "ZA",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+27-21-555-1234",
    "latitude": -33.7801,
    "longitude": 18.4567,
    "google_place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4"
  },
  "dropoff_address": {
    "name": "Customer",
    "code": "CUST-1001",
    "company": "Customer Co",
    "address_line_1": "10 Newline Road",
    "address_line_2": "Sunningdale",
    "town": "Sunningdale",
    "city": "Cape Town",
    "province": "Western Cape",
    "post_code": "7441",
    "country": "ZA",
    "first_name": "Jane",
    "last_name": "Smith",
    "phone": "+27-21-555-5678",
    "latitude": -33.7812,
    "longitude": 18.4588,
    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
  },
  "parcels": [
    {
      "title": "ABC",
      "weight_kg": 1,
      "length_cm": 10,
      "width_cm": 10,
      "height_cm": 10
    }
  ]
}'