Skip to main content
POST
/
chatbot
/
check-address
Check address validity and delivery options for chatbot
curl --request POST \
  --url https://api.example.com/chatbot/check-address \
  --header 'Content-Type: application/json' \
  --data '
{
  "mode": "location",
  "address": "1 rue de la paix, Paris",
  "businessOrganizationId": "clq6x2x0x0000c2uw3n8k1x7x",
  "coordinates": {
    "latitude": 48.8566,
    "longitude": 2.3522
  },
  "locationId": "clq6x2x0x0000c2uw3n8k1x7x",
  "orderDraftId": "od_123xyz",
  "serviceType": "delivery",
  "locationNumber": 1
}
'
{
  "success": true,
  "code": "ADDRESS_NOT_FOUND",
  "foundAddress": "1 Rue de la Paix, 75002 Paris, France",
  "deliveryFee": 5.99,
  "deliveryTime": "2024-07-20T10:30:00Z",
  "distance": 2.5,
  "locationId": "clq6x2x0x0000c2uw3n8k1x7x",
  "providedAddress": "1 Rue de la Paix, 75002 Paris, France"
}

Body

application/json
mode
string
required

Mode of the address check

Example:

"location"

address
string

Full address string to check

Example:

"1 rue de la paix, Paris"

businessOrganizationId
string

ID of the business organization to check against

Example:

"clq6x2x0x0000c2uw3n8k1x7x"

coordinates
object

Coordinates to check

locationId
string

ID of the location to check against

Example:

"clq6x2x0x0000c2uw3n8k1x7x"

orderDraftId
string

ID of the order draft associated with this check (required for organization mode)

Example:

"od_123xyz"

serviceType
enum<string>

Type of service requested - delivery or collection

Available options:
delivery,
collection
Example:

"delivery"

locationNumber
number

Number of locations to return (default: 1)

Example:

1

Response

200 - application/json

Address check result

success
boolean
required

Indicates if the address check was successful and delivery is possible.

Example:

true

code
enum<string>

A code indicating the reason for failure, if success is false.

Available options:
NO_DELIVERY,
ADDRESS_NOT_FOUND,
OUT_OF_RADIUS,
UBER_DIRECT_REJECTED,
CHASKIS_REJECTED
Example:

"ADDRESS_NOT_FOUND"

foundAddress
string

The validated and formatted address string, if found.

Example:

"1 Rue de la Paix, 75002 Paris, France"

deliveryFee
number<float>

The delivery fee for the address, if applicable.

Example:

5.99

deliveryTime
string<date-time>

The estimated delivery time in ISO 8601 format, if applicable.

Example:

"2024-07-20T10:30:00Z"

distance
number<float>

The distance in kilometers from the customer address to the selected location.

Example:

2.5

locationId
string

The ID of the location that can serve this address.

Example:

"clq6x2x0x0000c2uw3n8k1x7x"

providedAddress
string

The address that was provided by the customer.

Example:

"1 Rue de la Paix, 75002 Paris, France"