{"openapi":"3.0.0","info":{"version":"1.0.0","title":"Fulflld API","description":"Welcome to the public api documentation"},"servers":[{"url":"https://api.fulflld.com"}],"components":{"schemas":{"TOKEN":{"type":"object","properties":{"token":{"type":"string","description":"Authorization token"}}},"BadRequestErr":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP Status Code","example":400},"code":{"type":"string","description":"Error code","example":"VALIDATION_ERR"},"message":{"type":"string","description":"Error details"}}},"UnauthorizedErr":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP Status Code","example":401},"code":{"type":"string","description":"Error code","example":"UNAUTHORIZED_ERROR"},"message":{"type":"string","description":"Error details"}}},"NotFoundErr":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP Status Code","example":404},"code":{"type":"string","description":"Error code","example":"NOT_FOUND_ERROR"},"message":{"type":"string","description":"Error details"}}},"CREATE_TOKEN":{"type":"object","properties":{"app_id":{"type":"string","example":"1a95544f-5e9b-458b-9dbc-eb89bcfbe10e","description":"Unique app ID"},"app_secret":{"type":"string","example":"81bdcf2b-3b6f-4370-b13f-a350ff26b5bc","description":"App secret"}},"required":["app_id","app_secret"]},"RequestForbiddenErr":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP Status Code","example":403},"code":{"type":"string","description":"Error code","example":"REQUEST_FORBIDDEN_ERROR"},"message":{"type":"string","description":"Error details"}}},"InternalServerErr":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP Status Code","example":500},"code":{"type":"string","description":"Error code","example":"INTERNAL_SERVER_ERROR"},"message":{"type":"string","description":"Error details","example":"Couldn't create order"}}},"CreateOrder":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"required":["total","itemCount","description","tip","serviceTime"]},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the pickup location"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"required":["address","phone","location","scheduledPickupAt"]},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the dropoff location"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"required":["address","phone","location","scheduledDropoffAt"]},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"required":["signature","photo","notes"]},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}},"required":["orderId","order"]},"CreatePickupOnlyOrder":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"required":["total","itemCount","description","tip","serviceTime"]},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the pickup location"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"required":["address","phone","location","scheduledPickupAt","schedulePickupBeforeAt"]},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"required":["signature","photo","notes"]},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}},"required":["orderId","order","pickupDetails"]},"CreateDropoffOnlyOrder":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"required":["total","itemCount","description","tip","serviceTime"]},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the dropoff location"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"required":["address","phone","location","scheduledDropoffAt","scheduleDropoffAfterAt"]},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"required":["signature","photo","notes"]},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}},"required":["orderId","order","dropoffDetails"]},"UpdateOrder":{"type":"object","properties":{"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"status":{"type":"string","enum":["INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Desired status of the order"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}}},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the pickup location"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}}},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"lat lng value for the dropoff location"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}}},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}}},"etaDateTime":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"ETA for the driver to reach the destination"},"dropoffAttachments":{"type":"array","items":{"type":"string","format":"uri"},"example":["https://example.com/attachment1.jpg","https://example.com/attachment2.jpg"],"description":"An array of URLs pointing to POD (Proof of Delivery) images attached at the time of drop-off completion."},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}},"parameters":{}},"paths":{"/v1/auth/token":{"post":{"summary":"Generate authorization token","tags":["Auth"],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CREATE_TOKEN"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TOKEN"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErr"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErr"}}}}}}},"/v1/drivers/{id}":{"get":{"summary":"Get driver information","tags":["Driver"],"parameters":[{"schema":{"type":"string","example":"6749a4efe571edb6e7ab4823","description":"User ID of the driver"},"required":true,"description":"User ID of the driver","name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Shohidul Bari","description":"Driver name"},"phoneNumber":{"type":"string","example":"2038644450","description":"Driver contact number"},"licenseNumber":{"type":"string","example":"LSN-2024","description":"Driver license number"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/orders":{"post":{"summary":"Create Order","description":"For point-to-point deliveries, provide both pickupDetails and dropoffDetails. For pickup only orders, provide pickupDetails only. For dropoff only orders, provide dropoffDetails only.","tags":["Order"],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrder"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"description":"Pickup details of the order"},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"description":"Dropoff details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}},"get":{"summary":"Filter order","tags":["Order"],"parameters":[{"schema":{"type":"string","enum":["start-date","end-date"],"description":"Filter based on"},"required":true,"description":"Filter based on","name":"filter","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Start datetime of the filter window"},"required":true,"description":"Start datetime of the filter window","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End datetime of the filter window. If not provided, It will be auto calculated by adding 3 days with the start timestamp"},"required":false,"description":"End datetime of the filter window. If not provided, It will be auto calculated by adding 3 days with the start timestamp","name":"to","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"description":"Pickup details of the order"},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"description":"Dropoff details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/orders/pickup":{"post":{"summary":"Create pickup only order","tags":["Order"],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePickupOnlyOrder"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"description":"Pickup details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/orders/dropoff":{"post":{"summary":"Create dropoff only order","tags":["Order"],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDropoffOnlyOrder"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"description":"Dropoff details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/orders/{id}":{"get":{"summary":"Get order","tags":["Order"],"parameters":[{"schema":{"type":"string","description":"Given order ID during order creation","example":"6741c676f601c63879637714"},"required":true,"description":"Given order ID during order creation","name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"description":"Pickup details of the order"},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"description":"Dropoff details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/orders/{id}/{internalId}":{"patch":{"summary":"Update order","tags":["Order"],"parameters":[{"schema":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"Given orderId during order creation"},"required":true,"description":"Given orderId during order creation","name":"id","in":"path"},{"schema":{"type":"string","example":"674999088ecba46da4d27294","description":"Unique identifier of your order. This is used when executing other operations such as update"},"required":true,"description":"Unique identifier of your order. This is used when executing other operations such as update","name":"internalId","in":"path"}],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrder"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"8b9f138e-4600-43cd-8659-f823799b1983","description":"An unique ID to identify order in your system"},"externalId":{"type":"string","example":"SWT-1001","description":"A unique friendly ID that is displayed in the Order Card for easy identification for the user"},"order":{"type":"object","properties":{"total":{"type":"number","example":100,"description":"Total value for the order"},"itemCount":{"type":"integer","example":2,"description":"Number of distict number"},"description":{"type":"string","example":"Order description","description":"The details of your order for reference"},"metadata":{"type":"string","example":"Order metadata","description":"Metadata of your order"},"tip":{"type":"number","example":10,"description":"Tip for the driver"},"serviceTime":{"type":"integer","example":9,"description":"Service time for the order"}},"description":"Order details"},"pickupDetails":{"type":"object","properties":{"name":{"type":"string","example":"John Paul","description":"Pickup name"},"businessName":{"type":"string","example":"Paul Catering","description":"Pickup business name"},"address":{"type":"string","example":"501 Stanyan St, San Francisco, CA 94117","description":"Full address for pickup"},"instructions":{"type":"string","example":"Call me!","description":"Pickup instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Pickup contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled pickup datetime in utc format"},"schedulePickupBeforeAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for pickup-only orders; this is the scheduled pickup before time"},"driverNearPickupAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near pickup time"}},"description":"Pickup details of the order"},"dropoffDetails":{"type":"object","properties":{"name":{"type":"string","example":"Sumaiya Akter","description":"Dropoff name"},"businessName":{"type":"string","example":"United medical ltd.","description":"Dropoff name"},"address":{"type":"string","example":"710 Steiner St, San Francisco, CA 94117","description":"Dropoff address"},"instructions":{"type":"string","example":"Call me!","description":"Dropoff instruction for driver"},"phone":{"type":"string","example":"1415555267","description":"Dropoff contact number"},"location":{"type":"object","properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"description":"Location Details"},"scheduledDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"Scheduled dropoff datatime in utc format"},"scheduleDropoffAfterAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field is required for dropoff-only orders; this is the scheduled dropoff after time"},"driverNearDropoffAt":{"type":"string","format":"date-time","example":"2024-12-01T15:15:22Z","description":"This field can be used to update the driver near dropoff time"}},"description":"Dropoff details of the order"},"deliveryRequirements":{"type":"object","properties":{"signature":{"type":"boolean","example":true,"description":"Is signature required for delivery?"},"photo":{"type":"boolean","example":true,"description":"Is photo required for delivery?"},"notes":{"type":"boolean","example":true,"description":"Is notes required for delivery?"}},"description":"Order completion requirements for the driver"},"internalId":{"type":"string","description":"Unique identifier of your order. This is used when executing other operations such as update","example":"674999088ecba46da4d8234"},"assigneeId":{"type":"string","description":"Assigned driver ID if available","example":"674999088ecba46da4d176523"},"assignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Assigned driver name","example":"Jhon Doe"},"phone":{"type":"string","description":"Assigned driver phone number","example":"+12038644452"}}},"status":{"type":"string","enum":["TODO","INPROGRESS","COMPLETE","FAILED","CANCELLED"],"example":"COMPLETE","description":"Status of the order"},"statusDetails":{"type":"object","properties":{"pickupInTransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to pickup location"},"pickupArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the pickup location"},"pickupCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The Timestamp when the driver has picked up the order from the pickup location"},"dropoffIntransit":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver is in transit to dropoff location"},"dropoffArrived":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has arrived the dropoff location"},"dropoffCompleted":{"type":"string","nullable":true,"format":"date-time","description":"The timestamp when the driver has dropped off the order at the dropoff location"}},"description":"Timestamps for each progress of an order"},"eta":{"type":"string","nullable":true,"format":"date-time","description":"ETA for the driver to reach the dropoff location"},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The link of the attachment"},"type":{"type":"string","enum":["SIGNATURE","POD_IMAGE","AVATAR","DOC"],"description":"Type of the attachement"}}},"description":"Attachments present for the order. This may consist of proof of deliveries, signatures, etc"},"trackingUrl":{"type":"string","format":"uri","description":"This URL can be used to track the order"},"displayId":{"type":"string","description":"The order card in the workspace displays this Id"},"timezone":{"type":"string","enum":["Europe/London","Europe/Berlin","Europe/Moscow","America/New_York","America/Los_Angeles","Asia/Tokyo","Australia/Sydney","Asia/Dhaka","Pacific/Honolulu","America/Denver","America/Chicago","Europe/Paris","Europe/Rome","Europe/Madrid","Asia/Shanghai","Asia/Kolkata","Africa/Johannesburg","America/Sao_Paulo","America/Argentina/Buenos_Aires","Asia/Dubai","Asia/Seoul","America/Toronto","Europe/Istanbul","Europe/Amsterdam","Europe/Stockholm","Europe/Vienna","Europe/Zurich","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Australia/Melbourne","America/Vancouver","Pacific/Auckland","Africa/Cairo","Africa/Lagos","America/Mexico_City","America/Bogota","America/Lima","Asia/Kuala_Lumpur","Asia/Manila","Europe/Helsinki","Europe/Copenhagen","Europe/Dublin","Europe/Oslo","Europe/Lisbon","America/Montreal","America/Phoenix","America/Anchorage","Asia/Hong_Kong","Asia/Taipei","America/Santiago","Africa/Nairobi","Canada/Central","Canada/Eastern","Canada/Pacific","Canada/Mountain","America/Halifax","America/Edmonton","America/St_Johns","Europe/Warsaw","Europe/Budapest","Europe/Prague","Europe/Sofia","Europe/Athens","Europe/Bucharest","Europe/Riga","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Asia/Kuwait","Asia/Riyadh","Asia/Qatar","Asia/Bahrain","Asia/Amman","Asia/Beirut","Asia/Damascus","Africa/Khartoum","Africa/Tripoli","Africa/Tunis","Africa/Algiers","Africa/Casablanca","Africa/Accra","Africa/Abidjan","Africa/Dakar","America/Buenos_Aires","America/Caracas","America/La_Paz","America/Montevideo","America/Asuncion","America/Panama","America/Costa_Rica","America/Guatemala","America/Honduras","America/El_Salvador","America/Nicaragua","America/Belize","America/Jamaica","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Curacao","America/Aruba","America/Barbados","America/Grenada","America/St_Lucia","America/St_Vincent","America/Antigua","America/Dominica","America/St_Kitts","America/Anguilla","America/Montserrat","America/Tortola","America/Virgin","America/Cayman","America/Turks_and_Caicos","America/Bahamas","America/Bermuda","Pacific/Guam","Pacific/Saipan","Pacific/Majuro","Pacific/Tarawa","Pacific/Wake","Pacific/Nauru","Pacific/Funafuti","Pacific/Wallis","Pacific/Pago_Pago","Pacific/Fakaofo","Pacific/Niue","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Noumea","Pacific/Port_Moresby","Pacific/Bougainville","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tongatapu","Pacific/Chatham","Indian/Maldives","Indian/Kerguelen","Indian/Mauritius","Indian/Reunion","Indian/Seychelles","Indian/Comoro","Indian/Mayotte","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Etc/GMT","Etc/UTC"],"example":"America/New_York","description":"Timezone for the order, must be one of the supported timezones"},"smsNotification":{"type":"boolean","example":true,"description":"Whether to send SMS notification to the user for this order, default is true"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/route":{"post":{"summary":"Create Route","tags":["Route"],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"orderIds":{"type":"array","items":{"type":"string"},"example":["xyz-1","xyz-2"],"description":"List of order Ids"},"assigneeId":{"type":"string","example":"674999088ecba46da4d27294","description":"Assignee ID for this route"},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]}},"required":["orderIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"674999088ecba46da4d27294","description":"Route id"},"assigneeId":{"type":"string","nullable":true,"example":"674999088ecba46da4d27294","description":"Route assignee ID"},"ordersSequence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"xyz-1","description":"Order ID"},"type":{"type":"string","example":"order"},"index":{"type":"number","example":1,"description":"Order sequence index"}}}},"scheduledDate":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route scheduled timestamp"},"createdAt":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route creation timestamp"},"status":{"type":"string","enum":["COMPLETE","INPROGRESS","INCOMPLETE"],"description":"Status of the route","example":"COMPLETE"},"externalAssignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"],"description":"External assignee details","example":{"name":"John Doe","phone":"+12038644452","avatarUrl":"https://example.com/avatar.jpg","location":{"latitude":37.7763,"longitude":-122.4327}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}},"get":{"summary":"Filter Route","tags":["Route"],"parameters":[{"schema":{"type":"string","enum":["scheduled-date"],"description":"Filter based on"},"required":true,"description":"Filter based on","name":"filter","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-12-01T13:12:23.683Z","description":"Start datetime of the filter window"},"required":true,"description":"Start datetime of the filter window","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-12-03T13:12:23.683Z","description":"End datetime of the filter window. If not provided, It will be auto calculated by adding 3 days with the start timestamp"},"required":false,"description":"End datetime of the filter window. If not provided, It will be auto calculated by adding 3 days with the start timestamp","name":"to","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"674999088ecba46da4d27294","description":"Route id"},"assigneeId":{"type":"string","nullable":true,"example":"674999088ecba46da4d27294","description":"Route assignee ID"},"ordersSequence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"xyz-1","description":"Order ID"},"type":{"type":"string","example":"order"},"index":{"type":"number","example":1,"description":"Order sequence index"}}}},"scheduledDate":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route scheduled timestamp"},"createdAt":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route creation timestamp"},"status":{"type":"string","enum":["COMPLETE","INPROGRESS","INCOMPLETE"],"description":"Status of the route","example":"COMPLETE"},"externalAssignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"],"description":"External assignee details","example":{"name":"John Doe","phone":"+12038644452","avatarUrl":"https://example.com/avatar.jpg","location":{"latitude":37.7763,"longitude":-122.4327}}}}},"description":"List of routes in a given date range"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}},"/v1/route/{id}":{"patch":{"summary":"Update Route","tags":["Route"],"parameters":[{"schema":{"type":"string","example":"674999088ecba46da4d27294","description":"Route Id"},"required":true,"description":"Route Id","name":"id","in":"path"}],"requestBody":{"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"ordersSequence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"xyz-1","description":"Order Id"},"type":{"type":"string","example":"order"},"index":{"type":"number","example":1,"description":"desired index for reordering"}},"required":["id","type","index"]}},"assigneeId":{"type":"string","example":"674999088ecba46da4d27294","description":"Assignee ID for this route"},"externalAssignee":{"type":"object","properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"674999088ecba46da4d27294","description":"Route id"},"assigneeId":{"type":"string","nullable":true,"example":"674999088ecba46da4d27294","description":"Route assignee ID"},"ordersSequence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"xyz-1","description":"Order ID"},"type":{"type":"string","example":"order"},"index":{"type":"number","example":1,"description":"Order sequence index"}}}},"scheduledDate":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route scheduled timestamp"},"createdAt":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route creation timestamp"},"status":{"type":"string","enum":["COMPLETE","INPROGRESS","INCOMPLETE"],"description":"Status of the route","example":"COMPLETE"},"externalAssignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"],"description":"External assignee details","example":{"name":"John Doe","phone":"+12038644452","avatarUrl":"https://example.com/avatar.jpg","location":{"latitude":37.7763,"longitude":-122.4327}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}},"get":{"summary":"Get Route","tags":["Route"],"parameters":[{"schema":{"type":"string","example":"674999088ecba46da4d27294","description":"Route Id"},"required":true,"description":"Route Id","name":"id","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"674999088ecba46da4d27294","description":"Route id"},"assigneeId":{"type":"string","nullable":true,"example":"674999088ecba46da4d27294","description":"Route assignee ID"},"ordersSequence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"xyz-1","description":"Order ID"},"type":{"type":"string","example":"order"},"index":{"type":"number","example":1,"description":"Order sequence index"}}}},"scheduledDate":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route scheduled timestamp"},"createdAt":{"type":"string","format":"date-time","example":"2024-12-01T14:15:22Z","description":"Route creation timestamp"},"status":{"type":"string","enum":["COMPLETE","INPROGRESS","INCOMPLETE"],"description":"Status of the route","example":"COMPLETE"},"externalAssignee":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"External assignee full name","example":"John Doe"},"phone":{"type":"string","description":"External assignee phone number","example":"+12038644452"},"avatarUrl":{"type":"string","format":"uri","description":"This should be a publicly accessible valid url for the avatar image","example":"https://example.com/avatar.jpg"},"location":{"type":"object","nullable":true,"properties":{"latitude":{"type":"number","example":37.7763,"description":"Location latitude"},"longitude":{"type":"number","example":-122.4327,"description":"Location longitude"}},"required":["latitude","longitude"],"description":"Current location of the external assignee","example":{"latitude":37.7763,"longitude":-122.4327}}},"required":["name","phone"],"description":"External assignee details","example":{"name":"John Doe","phone":"+12038644452","avatarUrl":"https://example.com/avatar.jpg","location":{"latitude":37.7763,"longitude":-122.4327}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErr"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestForbiddenErr"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErr"}}}}}}}}}