TBBNMerchantDocs
Available

Localization

get/v1/localization/countries

List supported countries

curl -X GET https://api.tbbnetwork.com/v1/localization/countries \
  -H "Authorization: Bearer sk_sandbox_..." \

Response (200)

Example 200 response
[
  {
    "code": "code",
    "name": "Acme Co.",
    "callingCode": "callingCode"
  }
]
get/v1/localization/languages

List supported languages

curl -X GET https://api.tbbnetwork.com/v1/localization/languages \
  -H "Authorization: Bearer sk_sandbox_..." \

Response (200)

Example 200 response
[
  {
    "code": "code",
    "name": "Acme Co."
  }
]
get/v1/localization/locate

Where the caller's connection seems to be: country, and region and city when known. For filling a place in the background; ask the person when city is null. A signed-in member can pass their device's coordinates to get the city there instead.

curl -X GET https://api.tbbnetwork.com/v1/localization/locate \
  -H "Authorization: Bearer sk_sandbox_..." \

Parameters

latqueryoptional
lngqueryoptional

Response (200)

FieldTypeRequired
countrystringnull—
regionstringnull—
citystringnull—
latitudenumbernull—
longitudenumbernull—
sourcecoordinates | cdn | ip-city | ip-country | —
Example 200 response
{
  "country": null,
  "region": null,
  "city": null,
  "latitude": null,
  "longitude": null,
  "source": "coordinates"
}

Possible errors

Any other failure (validation, auth, rate limiting, a resource that doesn't exist) returns this same envelope with a non-2xx status — error.code is stable and safe to branch on; error.requestId is worth logging and including in a support request.

Example error response
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "A human-readable description of what went wrong.",
    "requestId": "req_01hxyz..."
  }
}
post/v1/localization/normalize-phone

Normalize a phone number to a canonical format

curl -X POST https://api.tbbnetwork.com/v1/localization/normalize-phone \
  -H "Authorization: Bearer sk_sandbox_..." \
  -H "Idempotency-Key: 5f2f...b91" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "+1-555-0173"
}'

Request body

FieldTypeRequired
phonestringyes

Response (201)

FieldTypeRequired
normalizedstring—
Example 201 response
{
  "normalized": "normalized"
}

Possible errors

Any other failure (validation, auth, rate limiting, a resource that doesn't exist) returns this same envelope with a non-2xx status — error.code is stable and safe to branch on; error.requestId is worth logging and including in a support request.

Example error response
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "A human-readable description of what went wrong.",
    "requestId": "req_01hxyz..."
  }
}