The Create Shipment endpoint lets you push orders into Shipi and optionally generate shipping labels automatically. Use it to integrate multi-carrier shipping into any custom platform, ERP, or application.
Base URL
https://app.myshipi.com
Authentication
Every API request requires two credentials sent in the request body:
The Create Shipment endpoint lets you push orders into Shipi and optionally generate shipping labels automatically. Use it to integrate multi-carrier shipping into any custom platform, ERP, or application.
Base URL
https://app.myshipi.com
Authentication
Every API request requires two credentials sent in the request body:
| Parameter | Type | Description |
|---|---|---|
shop_id | string | Your store’s integration key. Found in Settings > General. |
sitekey | string | Your website URL, base64-encoded. Example: base64_encode("https://mystore.com") |
Generating your sitekey
The sitekey is simply your store URL base64-encoded. Make sure to use the exact URL you configured in Shipi settings.
// PHP
$sitekey = base64_encode("https://mystore.com");
// JavaScript
const sitekey = btoa("https://mystore.com");
// Python
import base64
sitekey = base64.b64encode(b"https://mystore.com").decode()
Keep your credentials safe. Never expose your
shop_idin client-side code. Always make API calls from your server.
Endpoint
POST /label_api/entry.php
Creates a new shipment and optionally generates the shipping label automatically.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Your platform identifier (e.g. “custom”, “wix”, “shopify”) |
shop_id | string | Yes | Your integration key |
sitekey | string | Yes | Base64-encoded website URL |
order_id | string | Yes | Unique order identifier from your system |
mode | string | Yes | test or live |
exec_type | string | No | auto (generate label immediately) or manual (default — save order only) |
receiver_address | object | Yes | Recipient address details (see below) |
selected_carrier_data | object | No | Carrier selection (required for exec_type: auto) |
settings | object | No | Additional settings like service_code |
Receiver Address Object
| Field | Type | Description |
|---|---|---|
r_name | string | Recipient full name |
r_email | string | Recipient email |
r_phone | string | Recipient phone number |
r_company | string | Company name (optional) |
r_address_1 | string | Street address line 1 |
r_address_2 | string | Street address line 2 (optional) |
r_city | string | City |
r_state | string | State/Province code (e.g. “NY”, “ON”) |
r_zip | string | Postal/ZIP code |
r_country | string | ISO 2-letter country code (e.g. “US”, “DE”) |
Carrier Data Object
Required when using exec_type: "auto" to generate a label immediately.
| Field | Type | Description |
|---|---|---|
shipi_carrier | string | Carrier code: fedex, ups, dhl, usps, aramex, cp, purolator, dpd, etc. |
selected_service_mode | string | Service type (carrier-specific, e.g. “ground”, “express”) |
Example Request
{
"platform": "custom",
"shop_id": "your_integration_key",
"sitekey": "aHR0cHM6Ly9teXN0b3JlLmNvbQ==",
"order_id": "ORD-2024-001",
"mode": "live",
"exec_type": "auto",
"receiver_address": {
"r_name": "John Doe",
"r_email": "john@example.com",
"r_phone": "+14155551234",
"r_company": "",
"r_address_1": "123 Main Street",
"r_address_2": "Apt 4B",
"r_city": "New York",
"r_state": "NY",
"r_zip": "10001",
"r_country": "US"
},
"selected_carrier_data": {
"shipi_carrier": "fedex",
"selected_service_mode": "ground"
}
}
Success Response
{
"success": true,
"msg": "Data Saved Successfully",
"s_id": "12345"
}
Error Response
{
"success": false,
"msg": "Invalid credentials or store not found."
}
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Invalid credentials | shop_id or sitekey is wrong | Verify your integration_key and base64-encoded URL match your Settings |
Insufficient balance | Account balance is too low | Top up your balance in the Billing section |
Carrier error | Carrier API rejected the request | Check address format, weight, and carrier-specific requirements |
Tips
- Use
exec_type: "manual"to save the order without generating a label. You can then create the label from the Shipi dashboard. - Use
exec_type: "auto"withselected_carrier_datato generate labels automatically — ideal for automated workflows. - Use
mode: "test"during development. Switch tomode: "live"for production shipments. - The
s_idin the response is the Shipi shipment ID. Store it for future reference.
Code Examples
cURL
curl -X POST https://app.myshipi.com/label_api/entry.php \
-H "Content-Type: application/json" \
-d '{
"platform": "custom",
"shop_id": "your_integration_key",
"sitekey": "aHR0cHM6Ly9teXN0b3JlLmNvbQ==",
"order_id": "ORD-001",
"mode": "live",
"exec_type": "manual",
"receiver_address": {
"r_name": "John Doe",
"r_email": "john@example.com",
"r_phone": "+14155551234",
"r_address_1": "123 Main St",
"r_city": "New York",
"r_state": "NY",
"r_zip": "10001",
"r_country": "US"
}
}'
PHP
$data = [
'platform' => 'custom',
'shop_id' => 'your_integration_key',
'sitekey' => base64_encode('https://mystore.com'),
'order_id' => 'ORD-001',
'mode' => 'live',
'exec_type' => 'auto',
'receiver_address' => [
'r_name' => 'John Doe',
'r_email' => 'john@example.com',
'r_phone' => '+14155551234',
'r_address_1' => '123 Main St',
'r_city' => 'New York',
'r_state' => 'NY',
'r_zip' => '10001',
'r_country' => 'US'
],
'selected_carrier_data' => [
'shipi_carrier' => 'fedex',
'selected_service_mode' => 'ground'
]
];
$ch = curl_init('https://app.myshipi.com/label_api/entry.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($response['success']) {
echo "Shipment created: " . $response['s_id'];
} else {
echo "Error: " . $response['msg'];
}
Node.js
const response = await fetch('https://app.myshipi.com/label_api/entry.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
platform: 'custom',
shop_id: 'your_integration_key',
sitekey: Buffer.from('https://mystore.com').toString('base64'),
order_id: 'ORD-001',
mode: 'live',
exec_type: 'auto',
receiver_address: {
r_name: 'John Doe',
r_email: 'john@example.com',
r_phone: '+14155551234',
r_address_1: '123 Main St',
r_city: 'New York',
r_state: 'NY',
r_zip: '10001',
r_country: 'US'
},
selected_carrier_data: {
shipi_carrier: 'fedex',
selected_service_mode: 'ground'
}
})
});
const result = await response.json();
console.log(result.success ? `Shipment: ${result.s_id}` : `Error: ${result.msg}`);
Python
import requests
import base64
response = requests.post('https://app.myshipi.com/label_api/entry.php', json={
'platform': 'custom',
'shop_id': 'your_integration_key',
'sitekey': base64.b64encode(b'https://mystore.com').decode(),
'order_id': 'ORD-001',
'mode': 'live',
'exec_type': 'auto',
'receiver_address': {
'r_name': 'John Doe',
'r_email': 'john@example.com',
'r_phone': '+14155551234',
'r_address_1': '123 Main St',
'r_city': 'New York',
'r_state': 'NY',
'r_zip': '10001',
'r_country': 'US'
},
'selected_carrier_data': {
'shipi_carrier': 'fedex',
'selected_service_mode': 'ground'
}
})
result = response.json()
print(f"Shipment: {result['s_id']}" if result['success'] else f"Error: {result['msg']}")
Supported Carriers
| Carrier Code | Carrier Name |
|---|---|
dhl | DHL Express |
fedex | FedEx |
ups | UPS |
usps | USPS |
aramex | Aramex |
cp | Canada Post |
purolator | Purolator |
dpd | DPD |
acs | ACS Courier |
speedy | Speedy |
israel_post | Israel Post |
smsa | SMSA Express |
Need help? Contact us at support@myshipi.comshop_id string Your store’s integration key. Found in Settings > General. sitekey string Your website URL, base64-encoded. Example: base64_encode("https://mystore.com")
Generating your sitekey
The sitekey is simply your store URL base64-encoded. Make sure to use the exact URL you configured in Shipi settings.
// PHP
$sitekey = base64_encode("https://mystore.com");
// JavaScript
const sitekey = btoa("https://mystore.com");
// Python
import base64
sitekey = base64.b64encode(b"https://mystore.com").decode()
Keep your credentials safe. Never expose your
shop_idin client-side code. Always make API calls from your server.
Endpoint
POST /label_api/entry.php
Creates a new shipment and optionally generates the shipping label automatically.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Your platform identifier (e.g. “custom”, “wix”, “shopify”) |
shop_id | string | Yes | Your integration key |
sitekey | string | Yes | Base64-encoded website URL |
order_id | string | Yes | Unique order identifier from your system |
mode | string | Yes | test or live |
exec_type | string | No | auto (generate label immediately) or manual (default — save order only) |
receiver_address | object | Yes | Recipient address details (see below) |
selected_carrier_data | object | No | Carrier selection (required for exec_type: auto) |
settings | object | No | Additional settings like service_code |
Receiver Address Object
| Field | Type | Description |
|---|---|---|
r_name | string | Recipient full name |
r_email | string | Recipient email |
r_phone | string | Recipient phone number |
r_company | string | Company name (optional) |
r_address_1 | string | Street address line 1 |
r_address_2 | string | Street address line 2 (optional) |
r_city | string | City |
r_state | string | State/Province code (e.g. “NY”, “ON”) |
r_zip | string | Postal/ZIP code |
r_country | string | ISO 2-letter country code (e.g. “US”, “DE”) |
Carrier Data Object
Required when using exec_type: "auto" to generate a label immediately.
| Field | Type | Description |
|---|---|---|
shipi_carrier | string | Carrier code: fedex, ups, dhl, usps, aramex, cp, purolator, dpd, etc. |
selected_service_mode | string | Service type (carrier-specific, e.g. “ground”, “express”) |
Example Request
{
"platform": "custom",
"shop_id": "your_integration_key",
"sitekey": "aHR0cHM6Ly9teXN0b3JlLmNvbQ==",
"order_id": "ORD-2024-001",
"mode": "live",
"exec_type": "auto",
"receiver_address": {
"r_name": "John Doe",
"r_email": "john@example.com",
"r_phone": "+14155551234",
"r_company": "",
"r_address_1": "123 Main Street",
"r_address_2": "Apt 4B",
"r_city": "New York",
"r_state": "NY",
"r_zip": "10001",
"r_country": "US"
},
"selected_carrier_data": {
"shipi_carrier": "fedex",
"selected_service_mode": "ground"
}
}
Success Response
{
"success": true,
"msg": "Data Saved Successfully",
"s_id": "12345"
}
Error Response
{
"success": false,
"msg": "Invalid credentials or store not found."
}
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Invalid credentials | shop_id or sitekey is wrong | Verify your integration_key and base64-encoded URL match your Settings |
Insufficient balance | Account balance is too low | Top up your balance in the Billing section |
Carrier error | Carrier API rejected the request | Check address format, weight, and carrier-specific requirements |
Tips
- Use
exec_type: "manual"to save the order without generating a label. You can then create the label from the Shipi dashboard. - Use
exec_type: "auto"withselected_carrier_datato generate labels automatically — ideal for automated workflows. - Use
mode: "test"during development. Switch tomode: "live"for production shipments. - The
s_idin the response is the Shipi shipment ID. Store it for future reference.
Code Examples
cURL
curl -X POST https://app.myshipi.com/label_api/entry.php \
-H "Content-Type: application/json" \
-d '{
"platform": "custom",
"shop_id": "your_integration_key",
"sitekey": "aHR0cHM6Ly9teXN0b3JlLmNvbQ==",
"order_id": "ORD-001",
"mode": "live",
"exec_type": "manual",
"receiver_address": {
"r_name": "John Doe",
"r_email": "john@example.com",
"r_phone": "+14155551234",
"r_address_1": "123 Main St",
"r_city": "New York",
"r_state": "NY",
"r_zip": "10001",
"r_country": "US"
}
}'
PHP
$data = [
'platform' => 'custom',
'shop_id' => 'your_integration_key',
'sitekey' => base64_encode('https://mystore.com'),
'order_id' => 'ORD-001',
'mode' => 'live',
'exec_type' => 'auto',
'receiver_address' => [
'r_name' => 'John Doe',
'r_email' => 'john@example.com',
'r_phone' => '+14155551234',
'r_address_1' => '123 Main St',
'r_city' => 'New York',
'r_state' => 'NY',
'r_zip' => '10001',
'r_country' => 'US'
],
'selected_carrier_data' => [
'shipi_carrier' => 'fedex',
'selected_service_mode' => 'ground'
]
];
$ch = curl_init('https://app.myshipi.com/label_api/entry.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($response['success']) {
echo "Shipment created: " . $response['s_id'];
} else {
echo "Error: " . $response['msg'];
}
Node.js
const response = await fetch('https://app.myshipi.com/label_api/entry.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
platform: 'custom',
shop_id: 'your_integration_key',
sitekey: Buffer.from('https://mystore.com').toString('base64'),
order_id: 'ORD-001',
mode: 'live',
exec_type: 'auto',
receiver_address: {
r_name: 'John Doe',
r_email: 'john@example.com',
r_phone: '+14155551234',
r_address_1: '123 Main St',
r_city: 'New York',
r_state: 'NY',
r_zip: '10001',
r_country: 'US'
},
selected_carrier_data: {
shipi_carrier: 'fedex',
selected_service_mode: 'ground'
}
})
});
const result = await response.json();
console.log(result.success ? `Shipment: ${result.s_id}` : `Error: ${result.msg}`);
Python
import requests
import base64
response = requests.post('https://app.myshipi.com/label_api/entry.php', json={
'platform': 'custom',
'shop_id': 'your_integration_key',
'sitekey': base64.b64encode(b'https://mystore.com').decode(),
'order_id': 'ORD-001',
'mode': 'live',
'exec_type': 'auto',
'receiver_address': {
'r_name': 'John Doe',
'r_email': 'john@example.com',
'r_phone': '+14155551234',
'r_address_1': '123 Main St',
'r_city': 'New York',
'r_state': 'NY',
'r_zip': '10001',
'r_country': 'US'
},
'selected_carrier_data': {
'shipi_carrier': 'fedex',
'selected_service_mode': 'ground'
}
})
result = response.json()
print(f"Shipment: {result['s_id']}" if result['success'] else f"Error: {result['msg']}")
Need help? Contact us at support@myshipi.com