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
}
]

Get Shipping Address by ID

GET/api/v1/address/shipping/{id}

Return a single shipping address by its UUID.

Status values:

  • WAITING_APPROVAL: The address is pending approval.
  • USABLE: The address can be used for shipping.

Example Request (cURL)

curl -X GET "https://api.axro.com/api/v1/address/shipping/a1b2c3d4-e5f6-7890-abcd-1234567890ab" \
-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": "USABLE",
"info": "Can be used for shipping."
}

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

Attention!

  • You must provide at least firstname and lastname or company and department.
  • Not possible combinations: only firstname, only lastname, only company, only department, firstname + department, lastname + department, firstname + company, lastname + company.

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."
}

Example Response (duplicate address - HTTP 409)

{
"message":"Shipping address already exists.",
"address_id":"145df5c9-f2b6-54c8-979a-3cab913c1a17",
"request_id":"6f13384e-481e-41ed-b5a9-7448976bb68f"
}

Info: If a shipping address already exists, the API responds with HTTP 409 Conflict and provides the existing address ID.

Use existing address ID to place your order.


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"
}