Skip to main content
Source Tracking

Managing your source tracking

OddBytes avatar
Written by OddBytes
Updated over a week ago

Fetch source tracking codes

For fetching existing source tracking codes GET method is available:

GET Method

curl -b cf.log -c cf.log \
https://platform.oddbytes.com/api/v1/123/sourceTracking

JSON Response

{
"success": true,
"data": ["DDNET12","HH","DDNET01","DD"],
"total": 4
}

You can use limit and offset parameters to fetch codes by chunks:

GET Method

curl -b cf.log -c cf.log \
https://platform.oddbytes.com/api/v1/123/sourceTracking?limit=2&offset=2

JSON Response

{
"success": true,
"data": ["DDNET01", "DD"],
"total": 4
}

Storing source tracking codes

For storing new source tracking codes, use POST HTTP method and provide source tracking codes within trackingIDs parameter in JSON format (allowed lengths for ID's are 2 and 7!):

POST Method

curl -X POST --data '{"trackingIDs":["DDNET21","HT"]}' \
-c cf.log -b cf.log \
https://platform.oddbytes.com/api/v1/123/sourceTracking

JSON Response

{
"success": true,
"messages": [{
"message": "Successfully added 2 tracking IDs",
"scope": "API",
"level": "success"
}
]
}

Deleting source tracking codes

For deleting source tracking code, use DELETE HTTP method and provide source tracking codes within trackingIDs parameter in JSON format:

DELETE Method

curl -X DELETE --data '{"trackingIDs":["DDNET21","HT"]}' \
-c cf.log -b cf.log \
https://platform.oddbytes.com/api/v1/123/sourceTracking

JSON Response

{
"success": true,
"messages": [{
"message": "Successfully deleted 2 tracking IDs",
"scope": "API",
"level": "success"
}
]
}

Did this answer your question?