Fetch Address
2/7/25Less than 1 minute
The Addresses API allows users to manage their saved addresses, which can be used for orders and deliveries.
Endpoint:
GET /v1/addresses
Required Headers:
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY"
}
Query Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
limit | int | No | Number of addresses to retrieve. |
page | int | No | Pagination number. |
Example API Call (Fetch or Axios)
fetch('https://api.shopsynch.com/v1/addresses', {
method: 'GET',
headers: {
'Authorization': 'Bearer JWT_TOKEN',
'X-MerchantApiKey': 'MERCHANT_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
Sample 200 Response:
{
"data": [
{
"id": "1",
"street": "123 Main St",
"streetNumber": "12A",
"postalCode": "100001",
"city": "Lagos",
"state": "Lagos",
"country": "Nigeria",
"localGovernmentName": "Ikeja",
"isDefault": false
}
],
"message": "Addresses retrieved successfully",
"status": true
}
Next Steps
- Learn more about Delete Address