Add shipments
curl --request POST \
--url https://app.churningtracker.com/api/v1/shipments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"shipments": [
{
"retailer": "Best Buy",
"orderNumber": "BBY01-123456",
"trackingNumber": "1Z999AA10123456784"
}
]
}
'const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
shipments: [
{
retailer: 'Best Buy',
orderNumber: 'BBY01-123456',
trackingNumber: '1Z999AA10123456784'
}
]
})
};
fetch('https://app.churningtracker.com/api/v1/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.churningtracker.com/api/v1/shipments"
payload = { "shipments": [
{
"retailer": "Best Buy",
"orderNumber": "BBY01-123456",
"trackingNumber": "1Z999AA10123456784"
}
] }
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"addedCount": 1
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}Shipments
Add shipments
Adds tracking numbers to your buying group orders. Each shipment names its order by retailer and orderNumber. Gift card orders don’t take tracking numbers. If any shipment doesn’t match an order, nothing is added. Tracking numbers already on an order are skipped, so retries are safe. Buying group orders in purchased move to shipped.
POST
/
shipments
Add shipments
curl --request POST \
--url https://app.churningtracker.com/api/v1/shipments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"shipments": [
{
"retailer": "Best Buy",
"orderNumber": "BBY01-123456",
"trackingNumber": "1Z999AA10123456784"
}
]
}
'const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
shipments: [
{
retailer: 'Best Buy',
orderNumber: 'BBY01-123456',
trackingNumber: '1Z999AA10123456784'
}
]
})
};
fetch('https://app.churningtracker.com/api/v1/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.churningtracker.com/api/v1/shipments"
payload = { "shipments": [
{
"retailer": "Best Buy",
"orderNumber": "BBY01-123456",
"trackingNumber": "1Z999AA10123456784"
}
] }
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"addedCount": 1
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{
"path": "orderLineItems.0.unitPrice",
"message": "<string>"
}
]
}
}Authorizations
Your API key, starting with ct_key_.
Your API secret, starting with ct_secret_.
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
How many new tracking numbers were added.
Show child attributes
Show child attributes