All URIs are relative to /shipping/v3
Method | HTTP request | Description |
---|---|---|
items_create | POST /items | Create Item |
items_delete | DELETE /items/{itemId} | Delete Item |
items_get | GET /items/{itemId} | Get Item |
items_get_all | GET /items | Get Items |
items_update | PUT /items/{itemId} | Update item |
ItemResponse items_create(body, x_rmg_auth_token)
Create Item
Add a new item to your stored items 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.ItemsApi(rmail_apiv3.ApiClient(configuration))
body = rmail_apiv3.Item() # Item | The item.
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 Item
api_response = api_instance.items_create(body, x_rmg_auth_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling ItemsApi->items_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Item | The item. | |
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]
ItemResponse items_delete(x_rmg_auth_token, item_id)
Delete Item
Deletes the specified item.
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.ItemsApi(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.
item_id = 'item_id_example' # str | Your unique Item ID of the item to delete.
try:
# Delete Item
api_response = api_instance.items_delete(x_rmg_auth_token, item_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ItemsApi->items_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. | |
item_id | str | Your unique Item ID of the item 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]
Item items_get(x_rmg_auth_token, item_id)
Get Item
Get the item specified by your unique Item 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.ItemsApi(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.
item_id = 'item_id_example' # str | Your unique Item ID.
try:
# Get Item
api_response = api_instance.items_get(x_rmg_auth_token, item_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ItemsApi->items_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. | |
item_id | str | Your unique Item 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[Item] items_get_all(x_rmg_auth_token)
Get Items
Get all of your stored items
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.ItemsApi(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 Items
api_response = api_instance.items_get_all(x_rmg_auth_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling ItemsApi->items_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]
ItemResponse items_update(body, x_rmg_auth_token, item_id)
Update item
Update an item that is already stored with new details. The whole item 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.ItemsApi(rmail_apiv3.ApiClient(configuration))
body = rmail_apiv3.Item() # Item | The item 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.
item_id = 'item_id_example' # str | Your unique Item ID of the item to update.
try:
# Update item
api_response = api_instance.items_update(body, x_rmg_auth_token, item_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ItemsApi->items_update: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Item | The item with the updated details. | |
x_rmg_auth_token | str | Authorisation token required to invoke this operation. Can be retrieved by invoking the /token operation. | |
item_id | str | Your unique Item ID of the item 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]