### Example API Request with Pagination Parameters Source: https://docs.shipbubble.com/get-started/pagination Demonstrates how to make a GET request to an example list URL and include query parameters for pagination. The 'Page' parameter specifies the current page, and 'PerPage' limits the number of records returned per request. ```http GET /example_list_url?Page=1&PerPage=1 ``` -------------------------------- ### Get Shipping Wallet Balance (JavaScript Example) Source: https://docs.shipbubble.com/api-reference/wallet/get-shipping-wallet-balance This snippet demonstrates how to retrieve the shipping wallet balance using the Shipbubble API. It shows a successful response with the balance and currency. ```javascript { "status": "success", "message": "Retrieved successfully", "data": { "balance": 80124.2, "currency": "NGN" } } ``` -------------------------------- ### Fetch Shipping Rates (JavaScript Example) Source: https://docs.shipbubble.com/api-reference/rates/request-shipping-rates-from-selected-couriers This JavaScript code snippet demonstrates a successful response when fetching shipping rates from selected couriers. It includes details about the request token, courier information, cheapest courier options, and checkout data. ```javascript { "status": "success", "message": "Retrieved successfully", "data": { "request_token": "1feff032e536b3a87b4f428f958a6570fe434add4d00bd63338e6d49abf7d200", "couriers": [ { "courier_id": "darum", "courier_name": "Darum NG", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1639332277/courier_images/darum_orxysd.png", "service_code": "darum", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 0, "symbol": "%", "discounted": 0 }, "service_type": "pickup", "waybill": false, "delivery_eta": "Same day delivery", "currency": "₦", "vat": 191, "total": 2785 }, { "courier_id": "gigl", "courier_name": "GIG logistics", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1638640741/courier_images/gig_logo_wsxvwb.png", "service_code": "gigl", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 5, "symbol": "%", "discounted": 138 }, "service_type": "pickup", "waybill": true, "delivery_eta": "Same day delivery", "currency": "₦", "vat": 189, "total": 2750 } ], "cheapest_courier": { "courier_id": "gigl", "courier_name": "GIG logistics", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1638640741/courier_images/gig_logo_wsxvwb.png", "service_code": "gigl", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 5, "symbol": "%", "discounted": 138 }, "service_type": "pickup", "waybill": true, "delivery_eta": "Same day delivery", "currency": "₦", "vat": 189, "total": 2750 }, "checkout_data": { "ship_from": { "name": "Lebron James", "phone": "+2348057575855", "email": "lebron@james.com", "address": "Obafemi Awolowo Way, Alausa 101233, Ojodu, Nigeria" }, "ship_to": { "name": "Lebron James", "phone": "+2348057575855", "email": "lebron@james.com", "address": "Phase 1, 4 Michael Olawale-Cole Dr, Lekki Phase I 106104, Lagos, Nigeria" }, "package_amount": "₦1,510,000", "package_weight": "2.00KG", "pickup_time": "December 19th 2022, 8:00:43 PM" } } } ``` -------------------------------- ### Get Validated Addresses (JavaScript Example) Source: https://docs.shipbubble.com/api-reference/addresses/get-validated-addresses This JavaScript code snippet demonstrates a successful response from the Shipbubble API's address validation endpoint. It shows the structure of the returned JSON, including address results and pagination details. No external dependencies are required for this example. ```javascript { "status": "success", "message": "Retrieved successfully", "data": { "results": [ { "address_code": 18266419, "address_data": { "name": "Lebron James", "email": "lebron@james.com", "street_no": "1", "street": "Teslim Balogun Stadium, Alh. Masha Road, Lagos, Nigeria", "phone": "+2348057575855", "formatted_address": "Alh. Masha Rd, Surulere 101241, Lagos, Nigeria", "country": "Nigeria", "country_code": "NG", "city": "Surulere", "city_code": "Surulere", "state": "Lagos", "state_code": "LA", "postal_code": "101241", "latitude": 6.499872799999999, "longitude": 3.3609343 } }, { "address_code": 32235981, "address_data": { "name": "Lebron James", "email": "lebron@james.com", "street_no": "4", "street": "4 Michael Olawale-Cole Dr, Phase 1 105102, Lekki", "phone": "+2348057575855", "formatted_address": "Phase 1, 4 Michael Olawale-Cole Dr, Lekki Phase I 106104, Lagos, Nigeria", "country": "Nigeria", "country_code": "NG", "city": "Lagos", "city_code": "Lagos", "state": "Lagos", "state_code": "LA", "postal_code": "106104", "latitude": 6.459056599999999, "longitude": 3.4769383 } } ], "pagination": { "current": 0, "perPage": 50, "next": 1, "total": 1 } } } ``` -------------------------------- ### API Response Example (200 OK) Source: https://docs.shipbubble.com/api-reference/returns/get-rates-for-a-return-shipment-request This JSON object represents a successful API response for a shipment request. It includes a status, message, and detailed data about available couriers, their services, estimated delivery times, and pricing. The `request_token` is used to uniquely identify the request. ```json { "status": "success", "message": "Retrieved successfully", "data": { "request_token": "b6130ff493a30a6065f677a45b0ee1dd92edd07e80e473837248e99edaa029cd", "couriers": [ { "courier_id": "sendstack", "courier_name": "Sendstack", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1653144587/courier_images/sendstack_ijfbxw.png", "service_code": "sendstack", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 10, "symbol": "%", "discounted": 95 }, "service_type": "pickup", "waybill": false, "tracking_level": 7, "pickup_eta": "Next day pickup", "pickup_eta_time": "2022-07-26 11:29:53", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Next day delivery", "delivery_eta_time": "2022-07-27 11:29:53", "info": [ "Shipment will be processed by Sendstack for next day pickup July 26th 2022 ", "Shipment estimated delivery time is 24hrs (July 27th 2022) from day of pickup" ], "currency": "NGN", "vat": 71, "ratings": 4.4, "total": 1121 }, { "courier_id": "N", "courier_name": "DHL Nigeria", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1639728337/courier_images/dhl.png", "service_code": "dhl-nigeria", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 50, "symbol": "%", "discounted": 5835 }, "service_type": "pickup", "waybill": true, "tracking_level": 7, "pickup_eta": "Before 17:00 (GMT +1) July 25th 2022", "pickup_eta_time": "2022-07-25 17:01:00", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Estimated 1 day (s)", "delivery_eta_time": "2022-07-26 10:00:00", "info": [ "Shipment placed after 4 PM (GMT +1) will be processed to the next day", "Download waybill document from shipments page after shipment has been processed", "Attach waybill document to your packaged items", "Items to be shipped must be wrapped or packaged before pickup" ], "currency": "NGN", "vat": 437.63, "ratings": 4.6, "total": 6272.63 } ], "fastest_courier": { "courier_id": "N", "courier_name": "DHL Nigeria", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1639728337/courier_images/dhl.png", "service_code": "dhl-nigeria", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 50, "symbol": "%", "discounted": 5835 }, "service_type": "pickup", "waybill": true, "tracking_level": 7, "pickup_eta": "Before 17:00 (GMT +1) July 25th 2022", "pickup_eta_time": "2022-07-25 17:01:00", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Estimated 1 day (s)", "delivery_eta_time": "2022-07-26 10:00:00" } } } ``` -------------------------------- ### GET /websites/shipbubble/rates Source: https://docs.shipbubble.com/api-reference/rates/request-shipping-rates Fetches available shipping rates from different couriers based on shipment details. The response includes pricing, estimated pickup and delivery times, and service type information. ```APIDOC ## GET /websites/shipbubble/rates ### Description Fetches available shipping rates from different couriers based on shipment details. The response includes pricing, estimated pickup and delivery times, and service type information. ### Method GET ### Endpoint /websites/shipbubble/rates ### Parameters #### Query Parameters - **ship_from** (object) - Required - Origin address details. - **ship_to** (object) - Required - Destination address details. - **package_details** (object) - Required - Details about the package, including weight and dimensions. #### Request Body This endpoint does not typically use a request body for GET requests. Parameters are passed via query strings. ### Request Example ```json { "ship_from": { "name": "Lebron James", "phone": "+2348057575855", "email": "lebron@james.com", "address": "Teslim Balogun Stadium, Alh. Masha Road, Lagos, Nigeria" }, "ship_to": { "name": "Burger King", "phone": "+2347072377527", "email": "sdsfsfs997@gmail.com", "address": "brt bus oshodi terminal, oshodi, Lagos, Nigeria" }, "package_details": { "currency": "NGN", "package_amount": 801500, "package_weight": 8.5, "pickup_date": "April 10th 2025", "is_invoice_required": false } } ``` ### Response #### Success Response (200) - **cheapest_courier** (object) - Details of the cheapest courier option. - **courier_rates** (array) - An array of available courier rates. - **rate_card_amount** (number) - The amount to be displayed to your customer as shipping cost. - **total** (number) - The amount that will be charged from your shipping wallet. - **pickup_eta_time** (string) - Estimated time for package pickup. - **delivery_eta_time** (string) - Estimated time for package delivery. - **is_cod_available** (boolean) - Indicates if cash on delivery is available. - **tracking_level** (integer) - Indicates the responsiveness of the courier's tracking system (1-10). - **service_type** (string) - Type of service ('pickup' or 'dropoff'). - **dropoff_station** (object|null) - Details of the dropoff station if service_type is 'dropoff'. - **pickup_station** (object|null) - Details of the pickup station if service_type is 'dropoff'. #### Response Example ```json { "cheapest_courier": { "courier_id": "dellyman", "courier_name": "Dellyman", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1697995461/courier_images/dellyman_logo_ckd6z8.png", "service_code": "dellyman", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 0, "symbol": "%", "discounted": 0 }, "service_type": "pickup", "waybill": false, "on_demand": false, "is_cod_available": false, "tracking_level": 6, "ratings": 3, "votes": 1, "connected_account": true, "rate_card_amount": 1830, "rate_card_currency": "NGN", "pickup_eta": "Within 24 hours", "pickup_eta_time": "2025-04-11 12:44:06", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Within 1 - 2 working days", "delivery_eta_time": "2025-04-13 12:44:06", "info": null, "currency": "NGN", "vat": 0, "total": 400, "tracking": { "bars": 3, "label": "Average" } }, "courier_rates": [ { "courier_id": "redstar", "courier_name": "Redstar", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1697995461/courier_images/redstar_logo_x5b34d.png", "service_code": "redstar", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 10, "symbol": "%", "discounted": 270 }, "service_type": "pickup", "waybill": false, "on_demand": false, "is_cod_available": false, "tracking_level": 7, "ratings": 3, "votes": 1, "connected_account": false, "rate_card_amount": 3308, "rate_card_currency": "NGN", "pickup_eta": "Within 2 hour(s)", "pickup_eta_time": "2025-04-10 16:44:06", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Within 9 hrs", "delivery_eta_time": "2025-04-10 22:44:06", "info": null, "currency": "NGN", "vat": 203, "total": 3308, "tracking": { "bars": 4, "label": "Good" } }, { "courier_id": "dellyman", "courier_name": "Dellyman", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1697995461/courier_images/dellyman_logo_ckd6z8.png", "service_code": "dellyman", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 0, "symbol": "%", "discounted": 0 }, "service_type": "pickup", "waybill": false, "on_demand": false, "is_cod_available": false, "tracking_level": 6, "ratings": 3, "votes": 1, "connected_account": true, "rate_card_amount": 1830, "rate_card_currency": "NGN", "pickup_eta": "Within 24 hours", "pickup_eta_time": "2025-04-11 12:44:06", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Within 1 - 2 working days", "delivery_eta_time": "2025-04-13 12:44:06", "info": null, "currency": "NGN", "vat": 0, "total": 400, "tracking": { "bars": 3, "label": "Average" } } ], "checkout_data": { "ship_from": { "name": "Lebron James", "phone": "+2348057575855", "email": "lebron@james.com", "address": "Teslim Balogun Stadium, Alh. Masha Road, Lagos, Nigeria" }, "ship_to": { "name": "Burger King", "phone": "+2347072377527", "email": "sdsfsfs997@gmail.com", "address": "brt bus oshodi terminal, oshodi, Lagos, Nigeria" }, "currency": "NGN", "package_amount": 801500, "package_weight": 8.5, "pickup_date": "April 10th 2025", "is_invoice_required": false } } ``` ``` -------------------------------- ### POST /websites/shipbubble/rates Source: https://docs.shipbubble.com/api-reference/rates/request-shipping-rates This endpoint allows you to get shipping rates based on package details, sender and receiver addresses, and service preferences. It returns a list of available couriers and their rates. ```APIDOC ## POST /websites/shipbubble/rates ### Description This endpoint allows you to get shipping rates based on package details, sender and receiver addresses, and service preferences. It returns a list of available couriers and their rates. ### Method POST ### Endpoint /websites/shipbubble/rates ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **sender_address_code** (int) - Required - Address code of label pickup (gotten from **Addresses API**) - **reciever_address_code** (int) - Required - Address code of label pickup (gotten from **Addresses API**) - **pickup_date** (string) - Required - Specified date for shipment processing (format: "**yyyy-mm-dd** ") - **category_id** (int) - Required - Package item category - **package_items** (Array) - Required - An array of items to be shipped. Each item object should contain: `name` (string), `description` (string), `unit_weight` (string, in KG), `unit_amount` (string), `quantity` (string). All object items are required. - **service_type** (string) - Optional - Filter rates by their service types (e.g., "dropoff" or "pickup") - **delivery_instructions** (string) - Optional - Additional delivery instructions for the package. - **package_dimension** (Object) - Required - Dimension of the package to be delivered (in CM). Example: `{ "length":12, "width":10, "height":10 }`. You can use the **Package Dimensions API** if unsure. ### Request Example ```json { "sender_address_code": 12345, "reciever_address_code": 67890, "pickup_date": "2025-04-10", "category_id": 1, "package_items": [ { "name": "Jameson", "description": "Too sweet", "unit_weight": "0.002", "unit_amount": "5000", "quantity": "2" } ], "service_type": "pickup", "delivery_instructions": "Leave at the front desk.", "package_dimension": { "length": 12, "width": 10, "height": 10 } } ``` ### Response #### Success Response (200) - **request_token** (string) - Used to uniquely identify each rates API request. - **couriers** (Array) - An array of courier objects, each containing: - **courier_id** (string or int) - **courier_name** (string) - **courier_image** (string) - **service_code** (string) - **insurance** (Object) - **discount** (Object) - **service_type** (string) - **waybill** (boolean) - **on_demand** (boolean) - **is_cod_available** (boolean) - **cod_remit_days** (int) - **tracking_level** (int) - **ratings** (int) - **votes** (int) - **connected_account** (boolean) - **rate_card_amount** (float) - **rate_card_currency** (string) - **pickup_eta** (string) - **pickup_eta_time** (string) - **dropoff_station** (Object or null) - **pickup_station** (Object or null) - **delivery_eta** (string) - **delivery_eta_time** (string) - **info** (any or null) - **currency** (string) - **vat** (int) - **total** (float) - **tracking** (Object) - **fastest_courier** (Object) - Details of the fastest courier available. #### Response Example ```json { "status": "success", "message": "Retrieved successfully", "data": { "request_token": "b724643e35047b44bf6499ce32dec6bf44b4de88859c03198a6f5714e026173b", "couriers": [ { "courier_id": "cora", "courier_name": "Cora", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1659021064/courier_images/topship_ixpqdt.jpg", "service_code": "cora", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 10, "symbol": "%", "discounted": 0 }, "service_type": "pickup", "waybill": false, "on_demand": false, "is_cod_available": false, "cod_remit_days": 2, "tracking_level": 7, "ratings": 3, "votes": 1, "connected_account": false, "rate_card_amount": 3063, "rate_card_currency": "NGN", "pickup_eta": "Within 3 hours", "pickup_eta_time": "2025-04-10 15:44:06", "dropoff_station": null, "pickup_station": null, "delivery_eta": "Within 23 hrs", "delivery_eta_time": "2025-04-11 12:44:06", "info": null, "currency": "NGN", "vat": 188, "total": 3063, "tracking": { "bars": 4, "label": "Good" } }, { "courier_id": 1, "courier_name": "Routely (Express Standard)", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1659021064/courier_images/topship_ixpqdt.jpg", "service_code": "routely", "insurance": { "code": "not available", "fee": 0 }, "discount": { "percentage": 10, "symbol": "%", "discounted": 270 }, "service_type": "dropoff", "waybill": false, "on_demand": false, "is_cod_available": false, "tracking_level": 7, "ratings": 3, "votes": 1, "connected_account": false, "rate_card_amount": 12451.04, "rate_card_currency": "NGN", "pickup_eta": "Within 1 day(s)", "pickup_eta_time": "2025-04-11 12:44:06", "dropoff_station": { "name": "Find your nearest Routely dropoff location here", "address": "https://www.routely.co/", "phone": "+2349080777728" }, "pickup_station": { "name": "Find your nearest Routely pickup location here", "address": "https://www.routely.co/", "phone": "+2349080777728" }, "delivery_eta": "Within 1 - 4 working days", "delivery_eta_time": "2025-04-15 12:44:06", "info": null, "currency": "NGN", "vat": 834, "total": 12451.04, "tracking": { "bars": 4, "label": "Good" } } ], "fastest_courier": { "courier_id": 2, "courier_name": "Routely (Express Premium)", "courier_image": "https://res.cloudinary.com/delivry/image/upload/v1659021064/courier_images/topship_ixpqdt.jpg", "service_code": "routely", "insurance": { "code": "not available", "fee": 0 } } } } ``` ``` -------------------------------- ### Get Shipping Wallet Balance Source: https://docs.shipbubble.com/api-reference/wallet Retrieve the current balance of your shipping account's Naira wallet. ```APIDOC ## GET /api-reference/wallet/get-shipping-wallet-balance.md ### Description Retrieve your shipping account's Naira wallet balance. ### Method GET ### Endpoint /api-reference/wallet/get-shipping-wallet-balance ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **balance** (float) - The current balance in the Naira wallet. #### Response Example { "balance": 15000.50 } ``` -------------------------------- ### GET /v1/shipping/wallet/balance Source: https://docs.shipbubble.com/api-reference/wallet/get-shipping-wallet-balance Retrieves the current balance of the shipping wallet, including the amount and currency. ```APIDOC ## GET /v1/shipping/wallet/balance ### Description Retrieves the current balance of the shipping wallet, including the amount and currency. ### Method GET ### Endpoint https://api.shipbubble.com/v1/shipping/wallet/balance ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request, e.g., "success". - **message** (string) - A message describing the result of the request, e.g., "Retrieved successfully". - **data** (object) - Contains the wallet balance details. - **balance** (number) - The current balance in the wallet. - **currency** (string) - The currency of the balance (e.g., "NGN"). #### Response Example ```json { "status": "success", "message": "Retrieved successfully", "data": { "balance": 80124.2, "currency": "NGN" } } ``` ``` -------------------------------- ### Sample Address Details Response (JSON) Source: https://docs.shipbubble.com/api-reference/addresses/get-single-address-details This is a sample JSON response for a successful request to get single address details. It contains fields like name, email, street, phone, country, city, state, and geographical coordinates. ```json { "status": "success", "message": "Retrieved successfully", "data": { "name": "Abon Ayodeji", "email": "abon@james.com", "street_no": "1", "street": "Teslim Balogun Stadium, Alh. Masha Road, Lagos, Nigeria", "phone": "+2347079657900", "formatted_address": "Alh. Masha Rd, Surulere 101241, Lagos, Nigeria", "country": "Nigeria", "country_code": "NG", "city": "Surulere", "city_code": "Surulere", "state": "Lagos", "state_code": "LA", "postal_code": "101241", "latitude": 6.499872799999999, "longitude": 3.3609343 } } ``` -------------------------------- ### Sample Webhook Payload for Order Status Source: https://docs.shipbubble.com/api-reference/webhooks/webhook-simulator-sandbox This is a comprehensive example of a webhook payload that Shipbubble might send to your registered URL. It includes detailed information about the order, courier, shipping details, payment, and a history of package status updates. This payload can be used to test how your system handles various order states. ```json { "order_id": "SB-244512FE8276", "status": "pending", "courier": { "name": "Test courier 2", "email": "test2@getdelivry.com", "phone": "08012345678", "tracking_code": "725478", "tracking_message": "Tracking code: 725478", "rider_info": null }, "ship_from": { "name": "Lebron James", "phone": "+2348057575855", "email": "lebron@james.com", "address": "F9X6+W9V, Alh. Masha Rd, Surulere 101241, Lagos, Nigeria" }, "ship_to": { "name": "Lebron James", "email": "lebron@james.com", "phone": "+2348057575855", "address": "F9X6+W9V, Alh. Masha Rd, Surulere 101241, Lagos, Nigeria" }, "to_be_processed": "2022-07-13T21:42:32.000Z", "payment": { "shipping_fee": 2250, "currency": "NGN" }, "package_status": [ { "status": "Pending", "datetime": "2022-07-13 22:42:32" } ], "events": [], "dropoff_station": null, "pickup_station": null, "tracking_url": "http://localhost:3000/orders/tracking/SB-244512FE8276", "waybill_document": "https://storage.googleapis.com/get-web-app-assets/test-waybills/TEST-WAYBILL-DOCUMENT.pdf", "date": "2022-07-13T21:42:32.000Z" } ``` -------------------------------- ### Get Single Address Details (API) Source: https://docs.shipbubble.com/api-reference/addresses/get-single-address-details This snippet shows the API endpoint and method for retrieving details of a single address. It requires an `address_code` as a path parameter. The response includes detailed address information. ```HTTP GET https://api.shipbubble.com/v1/shipping/address/:address_code ``` -------------------------------- ### POST /v1/shipping/fetch_rates Source: https://docs.shipbubble.com/api-reference/rates/request-shipping-rates Requests shipping rates for a package. It's important to provide accurate package details for the best rate quote. Note that requests made after 6 PM GMT+1 will be processed the next day, and shipment requests are limited to 7 days from the current date. ```APIDOC ## POST /v1/shipping/fetch_rates ### Description Requests shipping rates for a package. Provides details on the cheapest, fastest, and best value couriers based on speed, price, and reliability. Shipment rates requested after 6 PM (GMT +1) will be scheduled for processing the following day. You can only request a shipment for a maximum of 7 days from the current date of request. ### Method POST ### Endpoint https://api.shipbubble.com/v1/shipping/fetch_rates ### Parameters #### Request Body - **package_details** (object) - Required - Details about the package to be shipped. - **weight** (number) - Required - The weight of the package. - **dimensions** (object) - Required - The dimensions of the package. - **length** (number) - Required - Length of the package. - **width** (number) - Required - Width of the package. - **height** (number) - Required - Height of the package. - **origin_address** (object) - Required - The origin address for the shipment. - **street** (string) - Required - Street address. - **city** (string) - Required - City. - **state** (string) - Required - State or province. - **zip_code** (string) - Required - Postal code. - **country** (string) - Required - Country code (e.g., US, CA). - **destination_address** (object) - Required - The destination address for the shipment. - **street** (string) - Required - Street address. - **city** (string) - Required - City. - **state** (string) - Required - State or province. - **zip_code** (string) - Required - Postal code. - **country** (string) - Required - Country code (e.g., US, CA). ### Request Example ```json { "package_details": { "weight": 5, "dimensions": { "length": 10, "width": 8, "height": 6 }, "origin_address": { "street": "123 Main St", "city": "Anytown", "state": "CA", "zip_code": "90210", "country": "US" }, "destination_address": { "street": "456 Oak Ave", "city": "Otherville", "state": "NY", "zip_code": "10001", "country": "US" } } } ``` ### Response #### Success Response (200) - **rates** (array) - An array of available shipping rates. - **courier** (string) - The name of the courier. - **price** (number) - The cost of the shipping rate. - **delivery_time** (string) - Estimated delivery time. - **service_level** (string) - The service level offered (e.g., cheapest, fastest, best_value). #### Response Example ```json { "rates": [ { "courier": "FedEx", "price": 15.50, "delivery_time": "2-3 business days", "service_level": "best_value" }, { "courier": "UPS", "price": 12.00, "delivery_time": "3-4 business days", "service_level": "cheapest" }, { "courier": "DHL", "price": 18.00, "delivery_time": "1-2 business days", "service_level": "fastest" } ] } ``` ``` -------------------------------- ### GET /v1/shipping/insurance_rates Source: https://docs.shipbubble.com/api-reference/insurance/get-insurance-rates Fetches a list of trusted insurance partners and their corresponding rates for shipping. ```APIDOC ## GET /v1/shipping/insurance_rates ### Description Fetches a list of trusted insurance partners and their corresponding rates for shipping. ### Method GET ### Endpoint https://api.shipbubble.com/v1/shipping/insurance_rates ### Parameters #### Query Parameters - **request_token** (String) - Required - Request token from Fetch Rates API ### Response #### Success Response (200) - **status** (String) - Indicates the status of the response. - **message** (String) - A message describing the result of the operation. - **data** (Array) - An array of insurance rate objects. - **code** (String) - Unique code for the insurance plan. - **insurer** (String) - The name of the insurance provider. - **currency** (String) - The currency of the insurance amount. - **insure_percentage** (Number) - The percentage rate for insurance. - **amount** (Number) - The calculated insurance amount. - **policy_condition** (String) - The conditions covered by the insurance policy. #### Response Example ```json { "status": "success", "message": "Retrieved successfully", "data": [ { "code": "git-retail-x0", "insurer": "AXA MANSARD", "currency": "NGN", "insure_percentage": 0.002, "amount": 1650, "policy_condition": "GIT for goods worth 0-500,000" }, { "code": "git-retail-x2", "insurer": "AXA MANSARD", "currency": "NGN", "insure_percentage": 0.0025, "amount": 1650, "policy_condition": "For retail goods valued between 500,001 - 1,000,000" } ] } ``` ``` -------------------------------- ### Request Wallet Fund Source: https://docs.shipbubble.com/api-reference/wallet Create a shipping wallet funding request. This endpoint allows you to initiate a request to add funds to your shipping wallet. ```APIDOC ## POST /api-reference/wallet/request-wallet-fund.md ### Description You can utilize this endpoint to create shipping wallet funding request. ### Method POST ### Endpoint /api-reference/wallet/request-wallet-fund ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **amount** (float) - Required - The amount to be funded into the wallet. - **payment_method** (string) - Required - The method of payment (e.g., 'bank_transfer', 'card'). ### Request Example { "amount": 5000.00, "payment_method": "bank_transfer" } ### Response #### Success Response (200) - **request_id** (string) - The unique identifier for the funding request. - **status** (string) - The current status of the funding request (e.g., 'pending', 'completed'). #### Response Example { "request_id": "wf_12345abcde", "status": "pending" } ``` -------------------------------- ### Get Single Address Details Source: https://docs.shipbubble.com/api-reference/addresses/get-single-address-details Retrieves the details of a specific address using its unique address code. ```APIDOC ## GET /v1/shipping/address/:address_code ### Description Retrieves the details of a specific address using its unique address code. ### Method GET ### Endpoint https://api.shipbubble.com/v1/shipping/address/:address_code ### Parameters #### Path Parameters - **address_code** (String) - Required - The address code of the required address. ### Response #### Success Response (200) - **status** (String) - The status of the request (e.g., "success"). - **message** (String) - A message indicating the result of the request. - **data** (Object) - An object containing the address details. - **name** (String) - The name associated with the address. - **email** (String) - The email address. - **street_no** (String) - The street number. - **street** (String) - The street name and details. - **phone** (String) - The phone number. - **formatted_address** (String) - The fully formatted address. - **country** (String) - The country. - **country_code** (String) - The country code. - **city** (String) - The city. - **city_code** (String) - The city code. - **state** (String) - The state or province. - **state_code** (String) - The state or province code. - **postal_code** (String) - The postal code. - **latitude** (Number) - The latitude coordinate. - **longitude** (Number) - The longitude coordinate. #### Response Example ```json { "status": "success", "message": "Retrieved successfully", "data": { "name": "Abon Ayodeji", "email": "abon@james.com", "street_no": "1", "street": "Teslim Balogun Stadium, Alh. Masha Road, Lagos, Nigeria", "phone": "+2347079657900", "formatted_address": "Alh. Masha Rd, Surulere 101241, Lagos, Nigeria", "country": "Nigeria", "country_code": "NG", "city": "Surulere", "city_code": "Surulere", "state": "Lagos", "state_code": "LA", "postal_code": "101241", "latitude": 6.499872799999999, "longitude": 3.3609343 } } ``` ```