Create an Address Book for the shipper
This API is used to show the step-by-step process of creating an Address Book.
URL Config
Endpoint: https://api.dps.io/api
APIVersion: v1
route: addressbook
path:
Method
POST
URL
https://api.dps.io/api/v1/addressbook
Request Headers
{
"Content-Type": "application/json",
"x-api-key": "<YOUR_API_KEY>",
"ShipperHash": "<YOUR_SHIPPER_HASH>"
}
Request Body
{
"ShipperHash": "05K9*********************JG6a",
"Name": "My First address Book",
"Description": "This is a Test Address book description",
"Tags": "Test_address_book, address_book_test"
}'
Curl request
curl --location --request POST 'https://api.dps.io/api/v1/addressbook' \
--header 'x-api-key: xxxxxxdfjbdjdfjdhfxxxxxxx' \
--header 'ShipperHash: 05K9*********************JG6a' \
--header 'Content-Type: application/json' \
--data-raw '{
"ShipperHash": "05K9*********************JG6a",
"Name": "My First address Book",
"Description": "This is a Test Address books description",
"Tags": "Test_address_book, address_book_test"
}'
Response
{
"id": 199,
"shipperhash": "05K9*********************JG6a",
"name": "My First address Book",
"description": "This is a Test Address book description",
"tags": "TagsTagsTags",
"createddate": "2022-11-10 21:17:37.118692",
"lastmodified": "2022-11-10 21:17:37.118692",
"message": "An Address book already exists with Name My First address Book"
}