Skip to main content

Get Delivery Fees

This API endpoint allows users to get the delivery fees and available payment methods for their order. Additionally, users can check the available time slots for scheduling the delivery.

  • Endpoint: api/customer/orders/delivery_fees

  • Http Method: POST

  • Request Body:

    • address_id The delivery address of the user.
    • branch_id (optional): the ID of the store branch from which the order will be picked up
tip

if a user selects pickup from a branch, please ensure that they do not provide an address ID in the request body. To enable pickup from a branch, check the ENABLE_CHECKOUT_PICKUP_FROM_STORE configuration.

  • SUCCESS Response:
KeyTypeDescription
total_amountFloatthe total amount of the items in cart, which includes the cost of the items being purchased.
delivery_feesIntegerthe amount of fees associated with the delivery service. In the provided JSON, the delivery_fees are set to 0, indicating that there are no delivery fees for this particular transaction.
distanceIntegerthe distance associated with the delivery. In the given JSON, it is set to null, implying that the distance information is not available or not applicable in this context.
free_deliveryBooleana key indicates whether free delivery is available for the transaction.
promosArrayan array of promotional codes or discounts available for the delivery service.
vouchersArrayan array of vouchers or coupons associated with the delivery service.
enable_instantBooleanThis boolean key indicates whether instant delivery is available. If set to true, it means that the delivery can be completed immediately. In the provided JSON, it is set to true, indicating that instant delivery is enabled.
time_slotsArraythe available time slots for delivery. In the given JSON, it is set to null, suggesting that the time slots information is not provided or not applicable.
payment_methodsArrayan array of available payment methods for the delivery service.
checkout_notesStringThis key provides additional notes related to the checkout process in English.
checkout_notes_arStringthe translated version of the checkout notes in Arabic.
{
"code": 200,
"data": {
"total_amount": 450,
"delivery_fees": 0,
"distance": null,
"free_delivery": false,
"promos": [],
"vouchers": [],
"enable_instant": false,
"time_slots": [
{
"slots": [
{
"date": "2023-04-17",
"slot_id": 37,
"time_from": "10:00:00",
"time_to": "17:00:00",
"label_en": "Tomorrow, 10:00 AM - 05:00 PM",
"label_ar": "غدا, 10:00 ص - 05:00 م"
},
{
"date": "2023-04-17",
"slot_id": 38,
"time_from": "18:00:00",
"time_to": "23:00:00",
"label_en": "Tomorrow, 06:00 PM - 11:00 PM",
"label_ar": "غدا, 06:00 م - 11:00 م"
}
],
"date": "2023-04-17",
"label_en": "Tomorrow",
"label_ar": "غدا"
},
//...
],
"payment_methods": [
{
"id": 1,
"name": "Cash On Delivery",
"name_ar": "الدفع عند الاستلام",
"is_online": 0,
"type": 0,
"icon": "https://docapi.supercommerce.io/images/payment_methods/cash_payment.png",
"plans": []
},
//...
],
"checkout_notes": "Delivery Fees may be changed",
"checkout_notes_ar": "قد يتم تغيير مصاريف التوصيل"
}
}
info

Check the following section to learn more about the Get Delivery Fees API Reference