Everything about Post Addresses
Get list of post return addresses
Parameter | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer(int32) | false | Page number |
limit | query | integer(int32) | false | Number of records per page |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/post/return-addresses'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your records.",
- "data": {
- "total": 2,
- "per_page": 15,
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 2,
- "data": [
- {
- "return_address_id": 4,
- "user_id": 1,
- "address_name": "My Address",
- "address_line_1": "Maritime Avenue",
- "address_line_2": "",
- "address_city": "Flynn",
- "address_state": "WA",
- "address_postal_code": "6302",
- "address_country": "AU"
}
]
}
}
Create post return address
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
address_name | string | true | none | Your address name. |
address_line_1 | string | true | none | Your address line 1 |
address_city | string | true | none | Your city |
address_postal_code | string | true | none | Your postal code |
address_country | string | true | none | Your country |
address_line_2 | string | false | none | Your address line 2 |
address_state | string | false | none | Your state |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "address_name": "test",
- "address_line_1": "1 test street",
- "address_line_2": null,
- "address_city": "Test",
- "address_postal_code": "6000",
- "address_country": "AU"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "New return address has been added.",
- "data": {
- "return_address_id": 4,
- "user_id": 1,
- "address_name": "My Address",
- "address_line_1": "Maritime Avenue",
- "address_line_2": "",
- "address_city": "Flynn",
- "address_state": "WA",
- "address_postal_code": "6302",
- "address_country": "AU"
}
}
Get specific post return address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
return_address_id | path | integer(int32) | true | Return address ID |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/post/return-addresses/{return_address_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your data.",
- "data": {
- "return_address_id": 4,
- "user_id": 1,
- "address_name": "My Address",
- "address_line_1": "Maritime Avenue",
- "address_line_2": "",
- "address_city": "Flynn",
- "address_state": "WA",
- "address_postal_code": "6302",
- "address_country": "AU"
}
}
Update post return address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
return_address_id | path | integer(int32) | true | Return address ID |
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
address_name | string | true | none | Your address name. |
address_line_1 | string | true | none | Your address line 1 |
address_city | string | true | none | Your city |
address_postal_code | string | true | none | Your postal code |
address_country | string | true | none | Your country |
address_line_2 | string | false | none | Your address line 2 |
address_state | string | false | none | Your state |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "address_country": "AU",
- "address_state": null
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your return address has been updated.",
- "data": {
- "return_address_id": 4,
- "user_id": 1,
- "address_name": "My Address",
- "address_line_1": "Maritime Avenue",
- "address_line_2": "",
- "address_city": "Flynn",
- "address_state": "WA",
- "address_postal_code": "6302",
- "address_country": "AU"
}
}
Delete specific post return address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
return_address_id | path | integer(int32) | true | Return address ID |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ --request DELETE \ 'https://rest.clicksend.com/v3/post/return-addresses/{return_address_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your return address has been deleted.",
- "data": [ ]
}