Create Delivery
Overview
The "Create Delivery" endpoint allows you to initiate a new delivery request within the OrderOut system. This API is used to create a delivery entry, specifying the necessary details about the delivery such as the origin, destination, and items to be delivered.
Endpoint
Merchants
Quotes
Orders
Method
- POST
Description: This endpoint creates a new delivery request in the system.
Request
Header:
"Accept:" application/json'
"API-key:"Bearer YOUR_API_KE"
"Content-type:" application/json
Request Body:
The request body should be a JSON object. The required fields vary depending on the type of request: Merchants, Quotes, or Orders.
Merchants
The request body must be a JSON object containing the following fields:
{
"merchant_name": "string", "merchant_address": "string", "merchant_email": "string", "merchant_phone": "string",
}
Filed Description
- merchant_name (string, required): Name of the merchant.
- merchant_address (string, required): Address of the merchant.
- merchant_email (string, required): Email address of the merchant.
- merchant_phone (string, required): Phone number of the merchant.
Response
{ "id": 5208499903266816 }
Quotes
"merchant_id": "int32", "dropoff_street": "string", "dropoff_city": "string", "dropoff_state": "string", "dropoff_zip": "string", "dropoff_country": "string", "dropoff_suite": "string", "dropoff_instructions": "string",
Field Description
- merchant_id (int32, required): Unique identifier for the merchant.
- dropoff_street (string, required): The street address where the delivery will be dropped off.
- dropoff_city (string, required): City of the dropoff location.
- dropoff_state (string, required): State of the dropoff location.
- dropoff_zip (string, required): ZIP code of the dropoff location.
- dropoff_country (string, required): Country of the dropoff location.
- dropoff_suite (string, optional): Suite number for the dropoff location, if applicable.
- dropoff_instructions (string, optional): Additional instructions for the delivery.
Response
[ { "id": 6569738449453056, "provider": "uber", "price": 499, "pickup_mins_from_now": 15, "delivery_mins_from_now": 30 }, { "id": 6150330564476928, "provider": "doordash", "price": 599, "pickup_mins_from_now": 25, "delivery_mins_from_now": 40 } ]
Orders
{
"merchant_id": 12345, "quote_id": 67890, "dropoff_street": "string", "dropoff_city": "string", "dropoff_state": "string", "dropoff_zip": "string", "dropoff_country": "string", "dropoff_suite": "string", "dropoff_instructions": "string", "customer_name": "string", "customer_phone": "string", "subtotal": 100.00, "driver_tip": 10.00,
}
Field Descriprion
- merchant_id (int32): Merchant's unique identifier.
- quote_id (int32): Quote's unique identifier.
- dropoff_street (string): Street address for the dropoff location.
- dropoff_city (string): City for the dropoff location.
- dropoff_state (string): State for the dropoff location.
- dropoff_zip (string): Zip code for the dropoff location.
- dropoff_country (string): Country for the dropoff location.
- dropoff_suite (string): Suite number for the dropoff location (if applicable).
- dropoff_instructions (string): Special instructions for the dropoff.
- customer_name (string): Name of the customer receiving the delivery.
- customer_phone (string): Phone number of the customer receiving the delivery.
- subtotal (float): Subtotal amount of the order.
- driver_tip (float): Tip amount for the driver.
Response
{ "id": 4684628498317312, "order_id": "2f90b8ce-efba-4a2b-8cd8-75a0d245f928", "tracker_id": "2f90b8ce-efba-4a2b-8cd8-75a0d245f928" }
Updated about 1 month ago