All URIs are relative to /shipping/v3
Method | HTTP request | Description |
---|---|---|
addresses_create | POST /addresses | Create Address |
addresses_delete | DELETE /addresses/{addressId} | Delete Address |
addresses_get | GET /addresses/{addressId} | Get Address |
addresses_get_all | GET /addresses | Get Addresses |
addresses_update | PUT /addresses/{addressId} | Update address |
AddressResponse addresses_create(body, x_rmg_auth_token)
Create Address
Add a new address to your address book that you can then use in your shipment requests.
from __future__ import print_function
import time
import rmail_apiv3
from rmail_apiv3.rest import ApiException
from pprint import pprint
# Configure API key authorization: clientID
configuration = rmail_apiv3.Configuration()
configuration.api_key['X-IBM-Client-Id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-IBM-Client-Id'] = 'Bearer'
# create an instance of the API class
api_instance = rmail_apiv3.AddressesApi(rmail_apiv3.ApiClient(configuration))
body = rmail_apiv3.Address() # Address | The address.
x_rmg_auth_token = 'x_rmg_auth_token_example' # str | Authorisation token required to invoke this operation. Can be retrieved by invoking the **/token** operation.
try:
# Create Address
api_response = api_instance.addresses_create(body, x_rmg_auth_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->addresses_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Address | The address. | |
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. |
- Content-Type: application/xml, application/json
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddressResponse addresses_delete(x_rmg_auth_token, address_id)
Delete Address
Deletes the specified address.
from __future__ import print_function
import time
import rmail_apiv3
from rmail_apiv3.rest import ApiException
from pprint import pprint
# Configure API key authorization: clientID
configuration = rmail_apiv3.Configuration()
configuration.api_key['X-IBM-Client-Id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-IBM-Client-Id'] = 'Bearer'
# create an instance of the API class
api_instance = rmail_apiv3.AddressesApi(rmail_apiv3.ApiClient(configuration))
x_rmg_auth_token = 'x_rmg_auth_token_example' # str | Authorisation token required to invoke this operation. Can be retrieved by invoking the **/token** operation.
address_id = 'address_id_example' # str | Your unique Address ID of the address to delete.
try:
# Delete Address
api_response = api_instance.addresses_delete(x_rmg_auth_token, address_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->addresses_delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. | |
address_id | str | Your unique Address ID of the address to delete. |
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Address addresses_get(x_rmg_auth_token, address_id)
Get Address
Get the address specified by your unique Address ID.
from __future__ import print_function
import time
import rmail_apiv3
from rmail_apiv3.rest import ApiException
from pprint import pprint
# Configure API key authorization: clientID
configuration = rmail_apiv3.Configuration()
configuration.api_key['X-IBM-Client-Id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-IBM-Client-Id'] = 'Bearer'
# create an instance of the API class
api_instance = rmail_apiv3.AddressesApi(rmail_apiv3.ApiClient(configuration))
x_rmg_auth_token = 'x_rmg_auth_token_example' # str | Authorisation token required to invoke this operation. Can be retrieved by invoking the **/token** operation.
address_id = 'address_id_example' # str | Your unique Address ID.
try:
# Get Address
api_response = api_instance.addresses_get(x_rmg_auth_token, address_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->addresses_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. | |
address_id | str | Your unique Address ID. |
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Address] addresses_get_all(x_rmg_auth_token)
Get Addresses
Get all of your stored addresses
from __future__ import print_function
import time
import rmail_apiv3
from rmail_apiv3.rest import ApiException
from pprint import pprint
# Configure API key authorization: clientID
configuration = rmail_apiv3.Configuration()
configuration.api_key['X-IBM-Client-Id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-IBM-Client-Id'] = 'Bearer'
# create an instance of the API class
api_instance = rmail_apiv3.AddressesApi(rmail_apiv3.ApiClient(configuration))
x_rmg_auth_token = 'x_rmg_auth_token_example' # str | Authorisation token required to invoke this operation. Can be retrieved by invoking the **/token** operation.
try:
# Get Addresses
api_response = api_instance.addresses_get_all(x_rmg_auth_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->addresses_get_all: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. |
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddressResponse addresses_update(body, x_rmg_auth_token, address_id)
Update address
Update an address that is already in your address book with new details. The whole address will be replaced with
new details.
from __future__ import print_function
import time
import rmail_apiv3
from rmail_apiv3.rest import ApiException
from pprint import pprint
# Configure API key authorization: clientID
configuration = rmail_apiv3.Configuration()
configuration.api_key['X-IBM-Client-Id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-IBM-Client-Id'] = 'Bearer'
# create an instance of the API class
api_instance = rmail_apiv3.AddressesApi(rmail_apiv3.ApiClient(configuration))
body = rmail_apiv3.Address() # Address | The address with the updated details.
x_rmg_auth_token = 'x_rmg_auth_token_example' # str | Authorisation token required to invoke this operation. Can be retrieved by invoking the **/token** operation.
address_id = 'address_id_example' # str | Your unique Address ID of the address to update.
try:
# Update address
api_response = api_instance.addresses_update(body, x_rmg_auth_token, address_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->addresses_update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Address | The address with the updated details. | |
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. | |
address_id | str | Your unique Address ID of the address to update. |
- Content-Type: application/xml, application/json
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]