Add shipment to order
curl --request POST \
--url https://store.salesive.com/api/v1/orders/add-shipment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop-id: <api-key>' \
--data '
{
"orderId": "<string>",
"shippingAddressId": "<string>",
"shippingOptionId": "<string>"
}
'import requests
url = "https://store.salesive.com/api/v1/orders/add-shipment"
payload = {
"orderId": "<string>",
"shippingAddressId": "<string>",
"shippingOptionId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'x-shop-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orderId: '<string>',
shippingAddressId: '<string>',
shippingOptionId: '<string>'
})
};
fetch('https://store.salesive.com/api/v1/orders/add-shipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/orders/add-shipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => '<string>',
'shippingAddressId' => '<string>',
'shippingOptionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/orders/add-shipment"
payload := strings.NewReader("{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/orders/add-shipment")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/orders/add-shipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"orderId": 123,
"user": "<string>",
"shop": "<string>",
"items": [
{
"product": "<string>",
"name": "<string>",
"price": 123,
"quantity": 2,
"variant": "<string>",
"sku": "<string>",
"variantAttributes": {},
"imageUrl": "<string>"
}
],
"subtotal": 123,
"shippingCost": 123,
"total": 123,
"shippingAddress": {
"fullName": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"phoneNumber": "<string>"
},
"payment": "<string>",
"shipment": "<string>",
"notes": "<string>",
"additionalInfo": [
{
"label": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Orders
Add shipment to order
Associate a shipment with an order using a shipping address and option.
POST
/
orders
/
add-shipment
Add shipment to order
curl --request POST \
--url https://store.salesive.com/api/v1/orders/add-shipment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop-id: <api-key>' \
--data '
{
"orderId": "<string>",
"shippingAddressId": "<string>",
"shippingOptionId": "<string>"
}
'import requests
url = "https://store.salesive.com/api/v1/orders/add-shipment"
payload = {
"orderId": "<string>",
"shippingAddressId": "<string>",
"shippingOptionId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'x-shop-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orderId: '<string>',
shippingAddressId: '<string>',
shippingOptionId: '<string>'
})
};
fetch('https://store.salesive.com/api/v1/orders/add-shipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/orders/add-shipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => '<string>',
'shippingAddressId' => '<string>',
'shippingOptionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/orders/add-shipment"
payload := strings.NewReader("{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/orders/add-shipment")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/orders/add-shipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": \"<string>\",\n \"shippingAddressId\": \"<string>\",\n \"shippingOptionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"orderId": 123,
"user": "<string>",
"shop": "<string>",
"items": [
{
"product": "<string>",
"name": "<string>",
"price": 123,
"quantity": 2,
"variant": "<string>",
"sku": "<string>",
"variantAttributes": {},
"imageUrl": "<string>"
}
],
"subtotal": 123,
"shippingCost": 123,
"total": 123,
"shippingAddress": {
"fullName": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"phoneNumber": "<string>"
},
"payment": "<string>",
"shipment": "<string>",
"notes": "<string>",
"additionalInfo": [
{
"label": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Request
POST /orders/add-shipment
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Content-Type: application/json
{
"orderId": "6a27d632289b87893fcbde35",
"shippingAddressId": "6938e4f0019a97bc42775b59",
"shippingOptionId": "69f8f047f5d9d8178331ec8a"
}
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the customer token as Bearer <jwt>. |
x-shop-id | string | Identify the shop that owns the order. |
Content-Type | string | Always set to application/json. |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | The order ID to associate with the shipment. |
shippingAddressId | string | Yes | The shipping address ID to use for delivery. |
shippingOptionId | string | Yes | The shipping option to use. |
courierId | string | No | ID of a specific courier within the shipping option. |
Successful response
{
"status": 200,
"success": true,
"message": "Shipment added to order",
"data": {
"shipment": {
"_id": "6a27d67f289b87893fcbde40",
"orders": [],
"courier": {
"id": null,
"name": "Standard Delivery",
"image": null
},
"shippingAddress": "6938e4f0019a97bc42775b59",
"shippingOption": "69f8f047f5d9d8178331ec8a",
"trackingCode": "",
"trackingUrl": "",
"status": "pending",
"trackingHistory": [],
"estimatedDelivery": null,
"shippingCost": 5000,
"packageDimensions": {
"unit": "in"
},
"deleted": false,
"deletedAt": null,
"createdAt": "2026-06-09T09:01:51.440Z",
"updatedAt": "2026-06-09T09:01:51.440Z",
"__v": 0
}
}
}
Error responses
404 Order not found
{
"status": 404,
"success": false,
"message": "Order not found",
"data": {}
}
400 Missing required field
{
"status": 400,
"success": false,
"message": "\"orderId\" is required",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Body
application/json
Was this page helpful?
⌘I

