Shipi Resources
Shipi Resources
Shipi Resources

API Documentation: How to Create Shipments with the Shipi API?

Written on February 17, 2026 by myshipi.com • Updated on February 17, 2026

Table of Contents

35 sections

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:

ParameterTypeDescription
shop_idstringYour store’s integration key. Found in Settings > General.
sitekeystringYour 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_id in 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

FieldTypeRequiredDescription
platformstringYesYour platform identifier (e.g. “custom”, “wix”, “shopify”)
shop_idstringYesYour integration key
sitekeystringYesBase64-encoded website URL
order_idstringYesUnique order identifier from your system
modestringYestest or live
exec_typestringNoauto (generate label immediately) or manual (default — save order only)
receiver_addressobjectYesRecipient address details (see below)
selected_carrier_dataobjectNoCarrier selection (required for exec_type: auto)
settingsobjectNoAdditional settings like service_code

Receiver Address Object

FieldTypeDescription
r_namestringRecipient full name
r_emailstringRecipient email
r_phonestringRecipient phone number
r_companystringCompany name (optional)
r_address_1stringStreet address line 1
r_address_2stringStreet address line 2 (optional)
r_citystringCity
r_statestringState/Province code (e.g. “NY”, “ON”)
r_zipstringPostal/ZIP code
r_countrystringISO 2-letter country code (e.g. “US”, “DE”)

Carrier Data Object

Required when using exec_type: "auto" to generate a label immediately.

FieldTypeDescription
shipi_carrierstringCarrier code: fedexupsdhluspsaramexcppurolatordpd, etc.
selected_service_modestringService 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 MessageCauseSolution
Invalid credentialsshop_id or sitekey is wrongVerify your integration_key and base64-encoded URL match your Settings
Insufficient balanceAccount balance is too lowTop up your balance in the Billing section
Carrier errorCarrier API rejected the requestCheck 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" with selected_carrier_data to generate labels automatically — ideal for automated workflows.
  • Use mode: "test" during development. Switch to mode: "live" for production shipments.
  • The s_id in 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 CodeCarrier Name
dhlDHL Express
fedexFedEx
upsUPS
uspsUSPS
aramexAramex
cpCanada Post
purolatorPurolator
dpdDPD
acsACS Courier
speedySpeedy
israel_postIsrael Post
smsaSMSA Express

Need help? Contact us at support@myshipi.comshop_id string Your store’s integration key. Found in Settings > Generalsitekey 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_id in 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

FieldTypeRequiredDescription
platformstringYesYour platform identifier (e.g. “custom”, “wix”, “shopify”)
shop_idstringYesYour integration key
sitekeystringYesBase64-encoded website URL
order_idstringYesUnique order identifier from your system
modestringYestest or live
exec_typestringNoauto (generate label immediately) or manual (default — save order only)
receiver_addressobjectYesRecipient address details (see below)
selected_carrier_dataobjectNoCarrier selection (required for exec_type: auto)
settingsobjectNoAdditional settings like service_code

Receiver Address Object

FieldTypeDescription
r_namestringRecipient full name
r_emailstringRecipient email
r_phonestringRecipient phone number
r_companystringCompany name (optional)
r_address_1stringStreet address line 1
r_address_2stringStreet address line 2 (optional)
r_citystringCity
r_statestringState/Province code (e.g. “NY”, “ON”)
r_zipstringPostal/ZIP code
r_countrystringISO 2-letter country code (e.g. “US”, “DE”)

Carrier Data Object

Required when using exec_type: "auto" to generate a label immediately.

FieldTypeDescription
shipi_carrierstringCarrier code: fedexupsdhluspsaramexcppurolatordpd, etc.
selected_service_modestringService 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 MessageCauseSolution
Invalid credentialsshop_id or sitekey is wrongVerify your integration_key and base64-encoded URL match your Settings
Insufficient balanceAccount balance is too lowTop up your balance in the Billing section
Carrier errorCarrier API rejected the requestCheck 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" with selected_carrier_data to generate labels automatically — ideal for automated workflows.
  • Use mode: "test" during development. Switch to mode: "live" for production shipments.
  • The s_id in 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