Skip to main content

Addresses

The Addresses API allows you to manage shipping and billing addresses for your account.

List Shipping Addresses

GET/api/v1/address/shipping/

Get all shipping addresses for the current user.

Example Request

curl -X GET https://api.axro.com/api/v1/address/shipping/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

[
{
"id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"company": "Example Corp",
"department": "Warehouse",
"firstname": null,
"lastname": null,
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US",
"phone": "+491234567890",
"email": "mail@example.com",
"status": "approved",
"info": null
}
]

Create Shipping Address

POST/api/v1/address/shipping/

Create a shipping address for the current user.

Query parameters

  • check (boolean, optional): If true, the address is validated/normalized and a suggestion is returned without saving.

Request body

NameTypeRequiredDescription
companystringCompany name (max 35 chars)
departmentstringDepartment name (max 35 chars)
firstnamestringContact first name
lastnamestringContact last name
streetstringStreet and number (max 35 chars)
zipstringZIP/Postal code
citystringCity (max 35 chars)
countrystringCountry code (ISO 3166-1 alpha-2)
phonestringPhone number in format +4912345678 (+ and 5-20 digits)
emailstringEmail address

Validation

  • company, department, street, and city must be at most 35 characters. Exceeding this limit results in HTTP 422 with a field-specific error.
  • phone must match +[5-20 digits].

Example Request

        # Normal create (persists address)
curl -X POST "https://api.axro.com/api/v1/address/shipping/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company": "Example Corp",
"department": "Warehouse",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US"
}'

# Check-only (validates/normalizes, does NOT persist, no id in response)
curl -X POST "https://api.axro.com/api/v1/address/shipping/?check=true" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company": "Example Corp",
"department": "Warehouse",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US"
}'

Example Response (create, persisted)

{
"id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"company": "Example Corp",
"department": "Warehouse",
"firstname": null,
"lastname": null,
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US",
"phone": "+491234567890",
"email": "mail@example.com",
"status": "USABLE",
"info": "Can be used for shipping."
}

Example Response (check=true, suggestion only)

{
"company": "Example Corp",
"department": "Warehouse",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US",
"phone": "+491234567890",
"email": "mail@example.com",
"status": "CHECK_ONLY",
"info": "Suggested validated/normalized address. Not saved."
}

Update Shipping Address (Phone and Email)

PUT/api/v1/address/shipping/{shipping-address-id}

Update email and phone for shipping service provider

NameTypeRequiredDescription
phonestringPhone number
emailstringEmail address

Example Request

curl -X PUT https://api.axro.com/api/v1/address/shipping/a1b2c3d4-e5f6-7890-abcd-1234567890ab \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"phone": "+491234567890",
"email": "mail@example.com"
}'

Example Response

{
"id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"company": "Example Corp",
"department": "Warehouse",
"firstname": "John",
"lastname": "Doe",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US",
"phone": "+491234567890",
"email": "mail@example.com",
"status": "pending",
"info": null
}

List Billing Address

GET/api/v1/address/billing/

Get the billing address for the current user

Example Request

curl -X GET https://api.axro.com/api/v1/address/billing/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
"company": "Example Corp",
"department": "Accounting",
"street": "456 Billing Ave",
"zip": "10002",
"city": "New York",
"country": "US"
}