Addresses
Addresses⚓
1 2 3 4 5 6 7 8 9 |
|
The address object is defined as follows:
Field | Description | Type |
---|---|---|
id | Address id | String, fixed size = 29 |
line1 | First line of the street address | String, min = 3, max = 50 |
line2 | Second line of the street address | String, min = 3, max = 50 |
line3 | Third line of the street address | String, min = 3, max = 50 |
city | City of the address | String, min = 1, max = 50 |
zip_code | Zip code of the city | String, min = 2, max = 16 |
state | State of the address | String, min = 1, max = 3 |
country | Country of the address | String, min = 2, max = 2 |
created | The Unix timestamp representing creation date of the object in local time | Int |
live_mode | Test or Live mode | Boolean inherited from a payment object if linked, default False |
Addresses objects created in Test
mode cannot be used in Live mode. Likewise, objects created in Live
mode cannot be used in Test mode.
Create a address⚓
HTTP request⚓
/v1/addresses/
Data parameters⚓
Parameter | Field |
---|---|
Optional | |
line1 | Optional |
line2 | Optional |
line3 | Optional |
city | Mandatory |
zip_code | Mandatory |
state | Optional |
country | Mandatory |
Code examples⚓
1 2 3 4 5 6 7 8 |
|
The above command returns JSON structured as follows:
1 2 3 4 5 6 7 8 9 |
|
Get address data⚓
HTTP request⚓
/v1/addresses/
id_address
Query parameters⚓
Parameter | Description |
---|---|
id_address | Address id |
Return parameters⚓
The request will return the address object asssociated with the id_address
you provided. If the id_address
does not exist, the API will return a 404 HTTP response code.
Code examples⚓
1 |
|
The above command returns JSON structured as follows:
1 2 3 4 5 6 7 8 9 |
|
Update a address⚓
HTTP request⚓
/v1/addresses/
id_address
Query parameters⚓
Parameter | Description |
---|---|
id_address | Address id |
Data parameters⚓
Parameter | Field |
---|---|
Optional | |
line1 | Optional |
line2 | Optional |
line3 | Optional |
city | Mandatory |
zip_code | Mandatory |
state | Optional |
country | Mandatory |
Return parameters⚓
The above command returns an HTTP 204 code if correctly processed or an HTTP 404 code if the address does not exist.
Code examples⚓
1 2 3 4 5 |
|
Delete an address⚓
HTTP request⚓
/v1/addresses/
id_address
Query parameters⚓
Parameter | Description |
---|---|
id_address | Address id |
Return parameters⚓
The above command returns an HTTP 204 code if correctly processed or an HTTP 404 code if the address does not exist.
Code examples⚓
1 |
|