Add Address

The “add_address” API is used to add a new address to a user’s profile in the Voomerr platform. The user needs to provide the necessary details of the address, such as the label, address lines 1 and 2, city, state/province, country, postcode, and latitude/longitude coordinates. The API requires authentication via the user’s ID.

Endpoint #

The Voomerr Add Address endpoint is POST https://admin.voomerr.com/api/add_address.php

Request Parameters #

Parameter Required Type Description
user_id Yes String The ID of the user for whom the address is added
label Yes String A label for the address (e.g. Home, Work, etc.)
address1 Yes String The first line of the address
address2 No String The second line of the address (if applicable)
city Yes String The city of the address
state No String The state or province of the address (if applicable)
country Yes String The country of the address
postcode Yes String The postal code of the address
latitude No Float The latitude coordinate of the address (if known)
longitude No Float The longitude coordinate of the address (if known)

Response: #

The API will return a JSON object with the following fields:

Field Type Description
status String The status of the request (either “success” or “error”)
message String A message explaining the result of the request
address_id String The ID of the newly created address, if successful

If the request was successful, the ‘status’ field will be set to “success”, and the ‘address_id’ field will contain the ID of the newly created address. If there was an error with the request, the ‘status’ field will be set to “error”, and the ‘message’ field will contain a message explaining the error.

Example Request: #

json
POST https://admin.voomerr.com/api/add_address.php
{
"user_id": "123",
"label": "Home",
"address1": "123 Main St",
"address2": "Apt 4B",
"city": "New York",
"state": "NY",
"country": "USA",
"postcode": "10001",
"latitude": 40.7128,
"longitude": -74.0060
}

Example Response: #

json
{
"status": "success",
"message": "Address added successfully",
"address_id": "456"
}

Powered by BetterDocs