Test addresses
Test mode has no special addresses. Reeds treats an address the same way in both modes: it reads your text with the real geocoder, or trusts your map pin. So you can reach every outcome with ordinary requests, and the recipes below work the same way every time.
Text depends on the map, so an address that verifies today may not match exactly tomorrow. In your tests, send a pin with latitude and longitude: Reeds trusts a pin, and the address comes back verified.
Each outcome
| Outcome | What to send |
|---|---|
verified, serviceable (Ikeja) | latitude: 6.6018, longitude: 3.3515 |
verified, serviceable (Lekki) | latitude: 6.4474, longitude: 3.4723 |
needs_confirmation with a suggestion | A broad area as text, such as Lekki, Lagos, with no pin |
needs_confirmation, no suggestion | Text of one or two characters, such as xy, with no pin |
verified, serviceable: false (reason ADDRESS_NOT_SERVICEABLE) | A pin outside coverage, in Ibadan: latitude: 7.3775, longitude: 3.947 |
verified, and a quote from Lagos returns available: false, INTERSTATE_NOT_AVAILABLE | A pin in Abuja: latitude: 9.0765, longitude: 7.4986 |
address is always required. With a pin it is the label you give the place, so send any text.
These work in Live mode too, because they are the normal rules. Nothing on this page is a shortcut, and saving an address in Test mode uses the real geocoder, so it counts towards your rate limits.
Use them
Create an address with POST /addresses:
curl -X POST https://api.getreeds.co/shipping/v1/addresses \
-H "Authorization: Bearer $REEDS_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Ada Okafor",
"phone": "08031234567",
"address": "Lekki, Lagos"
}'
Or send them inline in a quote, which saves the addresses and returns their ids:
curl -X POST https://api.getreeds.co/shipping/v1/quotes \
-H "Authorization: Bearer $REEDS_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pickup": {
"name": "Ada Okafor",
"phone": "08031234567",
"address": "23 Allen Avenue, Ikeja, Lagos",
"latitude": 6.6018,
"longitude": 3.3515
},
"dropoff": {
"name": "Tunde Bello",
"phone": "08051234567",
"address": "14 Admiralty Way, Lekki, Lagos",
"latitude": 6.4474,
"longitude": 3.4723
},
"package": { "description": "2 pairs of sneakers", "quantity": 1, "weight_kg": 1.5 }
}'
What each one returns
- Verified pickup and drop-off. The address returns
status: "verified"andserviceable: true. A quote between the two returns a price. - Needs confirmation. The address returns
status: "needs_confirmation"with asuggestion. A quote returnsavailable: falsewithADDRESS_NEEDS_CONFIRMATION. Create a draft instead, or confirm the address withPOST /addresses/{id}/confirm. - No match. Also
needs_confirmation, butsuggestionisnull. Practise showing your customer a form to correct the address. - Not serviceable. The address is
verifiedbutserviceable: false. A quote returnsavailable: falsewithADDRESS_NOT_SERVICEABLE. - Inter-state. The address is
verified, andserviceable: false(reasonADDRESS_NOT_SERVICEABLE) because the FCT is outside coverage. A quote from a Lagos pickup to it returnsavailable: falsewithINTERSTATE_NOT_AVAILABLE. As a pickup, it returnsADDRESS_NOT_SERVICEABLE.