Shipi Resources
Shipi Resources
Shipi Resources
Home / Knowledgebase / API Documentation: Address Book

API Documentation: Address Book

The Address Book API lets you manage saved shipper and receiver addresses. Save frequently used addresses and reuse them when creating shipments — no need to type the same address every time.

Authentication required. All requests need your integration_key. See the API Overview for details.

Endpoint

GET/POST /api/v1/addresses.php

Use the action parameter to specify the operation: listgetaddedit, or delete.


1. List Addresses

Get all saved addresses, optionally filtered by type.

GET /api/v1/addresses.php?action=list

Parameters

ParameterTypeRequiredDescription
actionstringNoDefaults to list
typestringNoFilter: shipper or receiver

Example Request

curl -X GET "https://app.myshipi.com/api/v1/addresses.php?action=list&type=shipper" \
  -H "X-Integration-Key: sk_live_abc123"
// PHP
$url = "https://app.myshipi.com/api/v1/addresses.php?" . http_build_query([
    'action' => 'list',
    'type' => 'shipper',
    'integration_key' => 'sk_live_abc123'
]);

$result = json_decode(file_get_contents($url, false, stream_context_create([
    'http' => ['header' => "Accept: application/json\r\n"]
])), true);
// JavaScript
const res = await fetch("https://app.myshipi.com/api/v1/addresses.php?action=list&type=shipper", {
  headers: { "X-Integration-Key": "sk_live_abc123" }
});
const data = await res.json();
# Python
import requests

response = requests.get("https://app.myshipi.com/api/v1/addresses.php", params={
    "action": "list",
    "type": "shipper"
}, headers={"X-Integration-Key": "sk_live_abc123"})

addresses = response.json()

Example Response

{
  "status": "success",
  "count": 3,
  "data": [
    {
      "id": 42,
      "type": "shipper",
      "name": "John Smith",
      "company": "MyShop Inc",
      "mobile": "555-0100",
      "email": "john@myshop.com",
      "address1": "123 Main Street",
      "address2": "Suite 200",
      "country": "US",
      "state": "NY",
      "city": "New York",
      "postal": "10001",
      "meta_data": {
        "gstin": {
          "label": "Tax ID / GSTIN / VAT",
          "value": "22ABCDE1234F1ZK"
        }
      },
      "created_at": "2025-01-15 10:30:00",
      "updated_at": "2025-01-20 14:45:00"
    }
  ]
}

2. Get Single Address

GET /api/v1/addresses.php?action=get&id=42
ParameterTypeRequiredDescription
actionstringYesMust be get
idintegerYesAddress ID

Returns a single address object (same format as the list response).


3. Add New Address

Save a new address to your address book.

POST /api/v1/addresses.php

Request Body (JSON)

FieldTypeRequiredDescription
actionstringYesMust be add
typestringNoshipper or receiver (default: shipper)
namestringYesContact name
companystringNoCompany name
mobilestringNoPhone number
emailstringNoEmail address
address1stringYesStreet address line 1
address2stringNoStreet address line 2
citystringYesCity
statestringNoState or province code
countrystringYesCountry code (US, CA, IN, GB, etc.)
postalstringYesPostal / ZIP code
tax_idstringNoTax ID / GSTIN / VAT number
s_housestringNoHouse number (for European addresses)
meta_dataobjectNoCustom key-value fields (see below)

Custom Meta Data

You can store any custom fields using the meta_data object. Each key maps to a {label, value} pair:

{
  "meta_data": {
    "department": {
      "label": "Department",
      "value": "Warehouse B"
    },
    "dock_number": {
      "label": "Loading Dock",
      "value": "Dock 4"
    }
  }
}

Example Request

curl -X POST "https://app.myshipi.com/api/v1/addresses.php" \
  -H "X-Integration-Key: sk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "add",
    "type": "shipper",
    "name": "John Smith",
    "company": "MyShop Inc",
    "mobile": "555-0100",
    "email": "john@myshop.com",
    "address1": "123 Main Street",
    "address2": "Suite 200",
    "city": "New York",
    "state": "NY",
    "country": "US",
    "postal": "10001",
    "tax_id": "22ABCDE1234F1ZK"
  }'
// PHP
$ch = curl_init("https://app.myshipi.com/api/v1/addresses.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-Integration-Key: sk_live_abc123",
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "action" => "add",
    "type" => "shipper",
    "name" => "John Smith",
    "company" => "MyShop Inc",
    "address1" => "123 Main Street",
    "city" => "New York",
    "state" => "NY",
    "country" => "US",
    "postal" => "10001"
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
// JavaScript
const res = await fetch("https://app.myshipi.com/api/v1/addresses.php", {
  method: "POST",
  headers: {
    "X-Integration-Key": "sk_live_abc123",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    action: "add",
    type: "receiver",
    name: "Jane Doe",
    address1: "456 Oak Avenue",
    city: "Los Angeles",
    state: "CA",
    country: "US",
    postal: "90001"
  })
});
const data = await res.json();
# Python
import requests

response = requests.post("https://app.myshipi.com/api/v1/addresses.php",
    headers={"X-Integration-Key": "sk_live_abc123"},
    json={
        "action": "add",
        "type": "shipper",
        "name": "John Smith",
        "company": "MyShop Inc",
        "address1": "123 Main Street",
        "city": "New York",
        "state": "NY",
        "country": "US",
        "postal": "10001"
    }
)
print(response.json())

Response (201 Created)

{
  "status": "success",
  "message": "Address added successfully.",
  "data": {
    "id": 43,
    "type": "shipper",
    "name": "John Smith",
    "company": "MyShop Inc",
    ...
  }
}

4. Edit Address

Update an existing address. Only send the fields you want to change.

POST /api/v1/addresses.php

Request Body (JSON)

FieldTypeRequiredDescription
actionstringYesMust be edit
idintegerYesAddress ID to update
(any field)stringNoOnly include fields you want to change

Example — Update only the phone number

curl -X POST "https://app.myshipi.com/api/v1/addresses.php" \
  -H "X-Integration-Key: sk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "edit",
    "id": 42,
    "mobile": "555-9999"
  }'

Response

{
  "status": "success",
  "message": "Address updated successfully.",
  "data": {
    "id": 42,
    "name": "John Smith",
    "mobile": "555-9999",
    ...
  }
}

5. Delete Address

Permanently remove an address from your address book.

POST /api/v1/addresses.php
FieldTypeRequiredDescription
actionstringYesMust be delete
idintegerYesAddress ID to delete

Example

curl -X POST "https://app.myshipi.com/api/v1/addresses.php" \
  -H "X-Integration-Key: sk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{"action": "delete", "id": 42}'

Response

{
  "status": "success",
  "message": "Address deleted successfully.",
  "data": { "id": 42 }
}

Address Object Fields

FieldTypeDescription
idintegerUnique address ID
typestringshipper or receiver
namestringContact name
companystringCompany name
mobilestringPhone number
emailstringEmail address
address1stringStreet address line 1
address2stringStreet address line 2
citystringCity
statestringState / province
countrystringCountry code
postalstringPostal / ZIP code
meta_dataobjectCustom fields as {key: {label, value}}
created_atstringCreation timestamp
updated_atstringLast update timestamp
Last updated: February 17, 2026
Was this helpful?