Introduction
Welcome to the V3 Collivery.net API reference. Please refer to the documentation of our older api Learn more
This documentation aims to provide all the information you need to work with our API.
Headers
{
"X-App-Name": "My Custom App", // Application Name
"X-App-Version": "0.2.1", // Application Version
"X-App-Host": ".NET Framework 4.8", // Framework/CMS name and version
"X-App-Lang": "C#", // Language your implementation is written in
"X-App-Url": "https://example.com", // URL your site is hosted on. *Optional
}
The following headers are required with each request, they help us to track the requests from each app in order to offer you help when you get stuck.
As a reminder you will see this tag with each example to indicate that you must include these in production. requires headers
Please make these values your own, they will be rejected if they are all the default values suggested here. You can, however, use the default headers if you are logging in as api@collivery.co.za or demo@collivery.co.za.
Base URL
https://dev.api.collivery.co.za
Authenticating requests
To authenticate requests, include a query parameter api_token in the request.
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
1. Authentication
### Please note: * indicates that this endpoint can only be accessed with your credentials * With these routes, you must provide an `api_token` parameter with the request * You can get your api_token calling the `/login` endpoint or by selecting `Edit` on Users indexLog in
requires headers
Log in with your credentials and receive back your api token (to be used in further calls)
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'json' => [
'email' => 'demo@collivery.co.za',
'password' => 'demo',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"email": "demo@collivery.co.za",
"password": "demo"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/login
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"email":"demo@collivery.co.za","password":"demo"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
x-robots-tag: noindex
x-ratelimit-limit: 10
x-ratelimit-remaining: 9
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Register
requires authentication requires headers
Create a new client account. You will need to be provided with access to this endpoint. Please contact us to enable it.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/register';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'register_radio' => 'business',
'name' => 'John Doe',
'terms' => true,
'email_address' => 'foobar@example.com',
'cellphone' => 123456789,
'suburb_id' => 1936,
'street_name' => 'Webber Street',
'street_number' => '58c',
'building' => 'MDS House',
'is_vat_registered' => 'no',
'vendor_type' => [
true,
],
'vendor_no' => 'fstxgjeny',
'affiliate_client_id' => 8,
'town_id' => 147,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/register"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"register_radio": "business",
"name": "John Doe",
"terms": true,
"email_address": "foobar@example.com",
"cellphone": 123456789,
"suburb_id": 1936,
"street_name": "Webber Street",
"street_number": "58c",
"building": "MDS House",
"is_vat_registered": "no",
"vendor_type": [
true
],
"vendor_no": "fstxgjeny",
"affiliate_client_id": 8,
"town_id": 147
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/register
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"register_radio":"business","name":"John Doe","terms":true,"email_address":"foobar@example.com","cellphone":123456789,"suburb_id":1936,"street_name":"Webber Street","street_number":"58c","building":"MDS House","is_vat_registered":"no","vendor_type":[true],"vendor_no":"fstxgjeny","affiliate_client_id":8,"town_id":147}'
Example response (200):
{
"data": {
"id": 54596,
"full_name": "John Doe",
"email_address": "foobar@example.com",
"landline_number": "123456789",
"mobile_number": "123456789",
"api_token": "q4HuuQP67J6NabYoqov4",
"client": {
"id": 40203,
"name": "John Doe",
"landline_number": "123456789",
"mobile_number": "123456789",
"account_code": null,
"account_type": "pre-paid",
"primary_address": {
"id": 2433244,
"custom_id": null,
"town": "Johannesburg",
"town_id": 147,
"suburb": "Selby",
"suburb_id": 1936,
"text": "John Doe, MDS House, 58c Webber Street, Selby, Johannesburg",
"short_text": "John Doe, Selby, Johannesburg"
}
}
}
}
Example response (412):
{
"error": [
[
"That email address is already registered. Please rather login through http://api.collivery.co.za/v3/login"
]
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
2. Addresses
Manage Addresses
Index
requires authentication requires headers
List your addresses
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/address';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'search' => 'Johannes',
'page' => '1',
'per_page' => '3',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/address"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"search": "Johannes",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/address
?api_token=OpSjx5TlXGCGkzGAvUOm&search=Johannes&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store
requires authentication requires headers
Save a new Address.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/address';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'town_id' => 147,
'town_name' => 'Johannesburg',
'province' => 'Gauteng',
'suburb_id' => 1936,
'suburb_name' => 'Selby',
'company_name' => 'MDS Collivery',
'building' => 'MDS House',
'street_number' => '58c',
'street' => 'Webber Street',
'location_type' => 1,
'location_type_name' => 'Business Premises',
'contact' => [
'id' => 2519728,
'full_name' => 'John Doe',
'cellphone' => '0723456789',
'email_address' => 'demo@collivery.co.za',
],
'country' => 'ZAF',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/address"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"town_id": 147,
"town_name": "Johannesburg",
"province": "Gauteng",
"suburb_id": 1936,
"suburb_name": "Selby",
"company_name": "MDS Collivery",
"building": "MDS House",
"street_number": "58c",
"street": "Webber Street",
"location_type": 1,
"location_type_name": "Business Premises",
"contact": {
"id": 2519728,
"full_name": "John Doe",
"cellphone": "0723456789",
"email_address": "demo@collivery.co.za"
},
"country": "ZAF"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/address
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"town_id":147,"town_name":"Johannesburg","province":"Gauteng","suburb_id":1936,"suburb_name":"Selby","company_name":"MDS Collivery","building":"MDS House","street_number":"58c","street":"Webber Street","location_type":1,"location_type_name":"Business Premises","contact":{"id":2519728,"full_name":"John Doe","cellphone":"0723456789","email_address":"demo@collivery.co.za"},"country":"ZAF"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/address/8';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/address/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/address/8
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Modify the details of a pre-existing address.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/address/8';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'town_id' => 147,
'town_name' => 'Johannesburg',
'province' => 'Gauteng',
'suburb_id' => 1936,
'suburb_name' => 'Selby',
'company_name' => 'MDS Collivery',
'building' => 'MDS House',
'street_number' => '58c',
'street' => 'Webber Street',
'location_type' => 1,
'location_type_name' => 'Business Premises',
'contact' => [
'id' => 2519728,
'full_name' => 'John Doe',
'cellphone' => '0723456789',
'email_address' => 'demo@collivery.co.za',
],
'country' => 'ZAF',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/address/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"town_id": 147,
"town_name": "Johannesburg",
"province": "Gauteng",
"suburb_id": 1936,
"suburb_name": "Selby",
"company_name": "MDS Collivery",
"building": "MDS House",
"street_number": "58c",
"street": "Webber Street",
"location_type": 1,
"location_type_name": "Business Premises",
"contact": {
"id": 2519728,
"full_name": "John Doe",
"cellphone": "0723456789",
"email_address": "demo@collivery.co.za"
},
"country": "ZAF"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/address/8
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"town_id":147,"town_name":"Johannesburg","province":"Gauteng","suburb_id":1936,"suburb_name":"Selby","company_name":"MDS Collivery","building":"MDS House","street_number":"58c","street":"Webber Street","location_type":1,"location_type_name":"Business Premises","contact":{"id":2519728,"full_name":"John Doe","cellphone":"0723456789","email_address":"demo@collivery.co.za"},"country":"ZAF"}'
Example response (200):
{
"data": {
"id": 2415979,
"custom_id": "",
"town": "Johannesburg",
"town_id": 147,
"suburb": "Selby",
"suburb_id": 1936,
"text": "MDS Collivery, MDS House, 58c Webber Street, Selby, Johannesburg",
"short_text": "MDS Collivery, Selby, Johannesburg",
"geocode_data": {
"accuracy": 5,
"accuracy_type": "Suburb",
"last_geocoded_at": "1900-01-01",
"latitude": 0,
"longitude": 0
}
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "There are waybills linked to that address, rather create a new one."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/address/952';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/address/952"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json()); curl -X DELETE \
"https://dev.api.collivery.co.za/v3/address/952
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"message": "Address # 952 has been deleted"
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "Address # 952 is already used for waybills, you cannot delete it."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Default Address
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/default_address';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/default_address"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/default_address
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"id": 2415979,
"custom_id": "",
"town": "Johannesburg",
"town_id": 147,
"suburb": "Selby",
"suburb_id": 1936,
"text": "MDS Collivery, MDS House, 58c Webber Street, Selby, Johannesburg",
"short_text": "MDS Collivery, Selby, Johannesburg"
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "Default address not found."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
3. Contacts
Manage Address Contacts
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/contacts';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'search' => 'Collivery',
'page' => '1',
'per_page' => '3',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/contacts"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"search": "Collivery",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/contacts
?api_token=OpSjx5TlXGCGkzGAvUOm&search=Collivery&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": [
{
"id": 729097,
"email": "support@collivery.co.za",
"full_name": "Collivery Support",
"cell_no": null,
"cellphone": null,
"work_no": "0123456789",
"work_phone": "0123456789"
},
{
"id": 729098,
"email": "integration@collivery.co.za",
"full_name": "Collivery Integration",
"cell_no": null,
"cellphone": null,
"work_no": "0123456789",
"work_phone": "0123456789"
},
{
"id": 729099,
"email": "api@collivery.co.za",
"full_name": "Collivery Api",
"cell_no": null,
"cellphone": null,
"work_no": "0123456789",
"work_phone": "0123456789"
}
],
"links": {
"first": "https://api.collivery.co.za/v3/contacts?page=1",
"last": "https://api.collivery.co.za/v3/contacts?page=1532",
"next": "https://api.collivery.co.za/v3/contacts?page=1501",
"prev": "https://api.collivery.co.za/v3/contacts?page=1499"
},
"meta": {
"current_page": 1500,
"from": 4498,
"last_page": 1532,
"path": "https://api.collivery.co.za/v3/contacts",
"per_page": "3",
"to": 4500,
"total": 4596
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store
requires authentication requires headers
Save a new Contact.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/contacts';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'address_id' => 952,
'email' => 'foo@example.com',
'full_name' => 'John Doe',
'cell_no' => '0721234567',
'cellphone' => '0721234567',
'work_no' => null,
'work_phone' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/contacts"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"address_id": 952,
"email": "foo@example.com",
"full_name": "John Doe",
"cell_no": "0721234567",
"cellphone": "0721234567",
"work_no": null,
"work_phone": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/contacts
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"address_id":952,"email":"foo@example.com","full_name":"John Doe","cell_no":"0721234567","cellphone":"0721234567","work_no":null,"work_phone":null}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/contacts/593';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/contacts/593"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/contacts/593
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/contacts/593';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'address_id' => 952,
'email' => 'foo@example.com',
'full_name' => 'John Doe',
'cell_no' => '0721234567',
'cellphone' => '0721234567',
'work_no' => null,
'work_phone' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/contacts/593"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"address_id": 952,
"email": "foo@example.com",
"full_name": "John Doe",
"cell_no": "0721234567",
"cellphone": "0721234567",
"work_no": null,
"work_phone": null
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/contacts/593
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"address_id":952,"email":"foo@example.com","full_name":"John Doe","cell_no":"0721234567","cellphone":"0721234567","work_no":null,"work_phone":null}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/contacts/ex';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/contacts/ex"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json()); curl -X DELETE \
"https://dev.api.collivery.co.za/v3/contacts/ex
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"message": "Contact # 593 has been deleted."
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "Contact # 593 is already used for waybills, you cannot delete it."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
4. Get Quote
Request a quote
requires authentication requires headers
Get a waybill quote based on the parameters provided.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/quote';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'services' => [
2,
],
'parcels' => [
[
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.2,
'quantity' => 2,
'product_id' => 2542,
],
],
'collection_town' => 147,
'delivery_town' => 200,
'collection_location_type' => 1,
'delivery_location_type' => 5,
'collection_time' => '2025-01-24 12:00',
'delivery_time' => '2025-01-25 16:00:00',
'strict_delivery_time' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/quote"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"services": [
2
],
"parcels": [
{
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.2,
"quantity": 2,
"product_id": 2542
}
],
"collection_town": 147,
"delivery_town": 200,
"collection_location_type": 1,
"delivery_location_type": 5,
"collection_time": "2025-01-24 12:00",
"delivery_time": "2025-01-25 16:00:00",
"strict_delivery_time": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/quote
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"services":[2],"parcels":[{"length":21.5,"width":10,"height":5.5,"weight":5.2,"quantity":2,"product_id":2542}],"collection_town":147,"delivery_town":200,"collection_location_type":1,"delivery_location_type":5,"collection_time":"2025-01-24 12:00","delivery_time":"2025-01-25 16:00:00","strict_delivery_time":false}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
5. Waybills
Index
requires authentication requires headers
List your waybills
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'custom_id' => 'CustomID_786',
'per_page' => '15',
'statuses' => '3',
'show' => 'active',
'include' => 'client,collection_address',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"custom_id": "CustomID_786",
"per_page": "15",
"statuses": "3",
"show": "active",
"include": "client,collection_address"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/waybill
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"custom_id":"CustomID_786","per_page":"15","statuses":"3","show":"active","include":"client,collection_address"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store
requires authentication requires headers
Create a new waybill
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'service' => 3,
'parcels' => [
[
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.2,
'quantity' => 2,
'product_id' => 2542,
'ref' => 'sfngnhcxu',
],
],
'collection_address' => '952',
'collection_contact' => 593,
'delivery_address' => '955',
'delivery_contact' => 596,
'exclude_weekend' => null,
'risk_cover' => true,
'consolidate' => null,
'battery_type' => 'pi_965',
'parcel_type' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"service": 3,
"parcels": [
{
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.2,
"quantity": 2,
"product_id": 2542,
"ref": "sfngnhcxu"
}
],
"collection_address": "952",
"collection_contact": 593,
"delivery_address": "955",
"delivery_contact": 596,
"exclude_weekend": null,
"risk_cover": true,
"consolidate": null,
"battery_type": "pi_965",
"parcel_type": 2
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/waybill
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"service":3,"parcels":[{"length":21.5,"width":10,"height":5.5,"weight":5.2,"quantity":2,"product_id":2542,"ref":"sfngnhcxu"}],"collection_address":"952","collection_contact":593,"delivery_address":"955","delivery_contact":596,"exclude_weekend":null,"risk_cover":true,"consolidate":null,"battery_type":"pi_965","parcel_type":2}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
This will return a waybill's information, optionally along with addresses, contacts, proofs of delivery as needed
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill/2904397';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'include' => 'client,collection_address',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill/2904397"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"include": "client,collection_address",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/waybill/2904397
?api_token=OpSjx5TlXGCGkzGAvUOm&include=client%2Ccollection_address
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"id": 2904397,
"custom_id": "",
"service_type_id": 2,
"service_type_name": "Next Day",
"collection_time": 1559127600,
"customer_reference": "",
"delivery_time": 1559224800,
"parcel_count": 1,
"special_instructions": "",
"collection_address_id": 647187,
"collection_contact_id": 671846,
"delivery_address_id": 660058,
"delivery_contact_id": 684889,
"status_id": 6,
"status_name": "Invoiced",
"parcel_description": "",
"weight": 0.4,
"volumetric_weight": 0.6,
"total_price": 100,
"risk_cover": false,
"parcels": [
{
"add_method": "client",
"created_at": "2020-09-18 14:33:41",
"custom_id": "",
"height": "6.0",
"id": 7699472,
"waybill_id": 4001907,
"length": "22.0",
"parcel_number": 1,
"quantity": 1,
"volumetric_weight": "0.3",
"weight": "5.2",
"width": "10.0"
}
],
"client": {
"id": 116,
"name": "Test Collivery (Pty) Ltd",
"landline_number": "011 241 4911",
"mobile_number": null,
"account_code": null,
"account_type": "account"
},
"collection_address": {
"id": 647187,
"custom_id": null,
"town_id": 147,
"suburb_id": 1936,
"text": "MDS Collivery, MDS House, 58c Webber St, Selby, Johannesburg",
"short_text": "MDS Collivery, Selby, Johannesburg"
}
}
}
Example response (403):
{
"error": {
"http_code_text": "Forbidden",
"http_code": 403,
"message": "That waybill is not linked to your account."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Allows you to update the waybill's service type.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill/8';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'include' => 'client,collection_address',
],
'json' => [
'service' => 3,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"include": "client,collection_address",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"service": 3
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/waybill/8
?api_token=OpSjx5TlXGCGkzGAvUOm&include=client%2Ccollection_address
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"service":3}'
Example response (200):
{
"data": {
"id": 4001907,
"custom_id": "",
"service_type_id": 3,
"service_type_name": "Road Freight",
"collection_time": 1559127600,
"customer_reference": "",
"delivery_time": 1559224800,
"parcel_count": 1,
"special_instructions": "",
"collection_address_id": 647187,
"collection_contact_id": 671846,
"delivery_address_id": 660058,
"delivery_contact_id": 684889,
"status_id": 6,
"status_name": "Invoiced",
"parcel_description": "",
"weight": 0.4,
"volumetric_weight": 0.6,
"total_price": 100,
"risk_cover": false,
"parcels": [
{
"add_method": "client",
"created_at": "2020-09-18 14:33:41",
"custom_id": "",
"height": "6.0",
"id": 7699472,
"waybill_id": 4001907,
"length": "22.0",
"parcel_number": 1,
"quantity": 1,
"volumetric_weight": "0.3",
"weight": "5.2",
"width": "10.0"
}
],
"client": {
"id": 116,
"name": "Test Collivery (Pty) Ltd",
"landline_number": "011 241 4911",
"mobile_number": null,
"account_code": null,
"account_type": "account"
},
"collection_address": {
"id": 647187,
"custom_id": null,
"town_id": 147,
"suburb_id": 1936,
"text": "MDS Collivery, MDS House, 58c Webber St, Selby, Johannesburg",
"short_text": "MDS Collivery, Selby, Johannesburg"
}
}
}
Example response (401):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 401,
"message": "Waybill # 4001907 has already started collection/delivery process, cannot update."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PrintLabel
requires authentication requires headers
Print waybill labels (only for customers who have a WebPrinter installed)
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill/8/print_label/6';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill/8/print_label/6"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/waybill/8/print_label/6
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (403):
{
"error": {
"http_code_text": "Forbidden",
"http_code": 403,
"message": "That waybill is not linked to your account."
}
}
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
6. Status Tracking
Fetch and query status updates for your waybills
Index
requires authentication requires headers
Show a list of status tracking records
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/status_tracking';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'statuses' => '1,3',
'per_page' => 100,
'start_date' => '2023-10-10',
'end_date' => '2023-11-10',
'page' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/status_tracking"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"statuses": "1,3",
"per_page": 100,
"start_date": "2023-10-10",
"end_date": "2023-11-10",
"page": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/status_tracking
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"statuses":"1,3","per_page":100,"start_date":"2023-10-10","end_date":"2023-11-10","page":1}'
Example response (200):
{
"data": [
{
"status_id": 1,
"status_name": "Waiting Client Acceptance",
"waybill_id": 4105972,
"created_at": "2019-08-12 06:02"
},
{
"status_id": 3,
"status_name": "Quote Accepted",
"waybill_id": 4105972,
"created_at": "2019-08-12 06:02"
},
{
"status_id": 1,
"status_name": "Waiting Client Acceptance",
"waybill_id": 4105999,
"created_at": "2019-08-12 06:03"
}
],
"links": {
"first": "http://api.collivery.co.za/v3/status_tracking?page=1",
"last": "http://api.collivery.co.za/v3/status_tracking?page=33",
"prev": null,
"next": "http://api.collivery.co.za/v3/status_tracking?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 33,
"path": "http://api.collivery.co.za/v3/status_tracking",
"per_page": "3",
"to": 3,
"total": 98
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Display all status tracking for a specific waybill
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/status_tracking/8';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/status_tracking/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/status_tracking/8
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Accept, Cancel, or Unhold a waybill
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/status_tracking/8';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'status_id' => 3.0,
'cheapest' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/status_tracking/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"status_id": 3,
"cheapest": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/status_tracking/8
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"status_id":3,"cheapest":true}'
Example response (200):
{
"data": {
"message": "Waybill 4001907 updated to Quote Accepted"
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "You have a prepaid account, you need to pay before accepting waybill # 4001907."
},
"meta": {
"payment_needed": "https://collivery.net/payment_requests/store?waybills%5B0%5D=4001907"
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "Waybill # 4001907 has already started collection/delivery process, cannot cancel."
}
}
Example response (400):
{
"error": {
"http_code_text": "Bad Request",
"http_code": 400,
"message": "Your client is not allowed to unhold waybills."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
7. Waybill Documents
Get your Quote or Waybill documents
Index
requires authentication requires headers
List your waybill documents
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill_documents/4001907';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill_documents/4001907"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/waybill_documents/4001907
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Get the details and base64 encoded image of the waybill document
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/waybill_documents/4001907/waybill';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/waybill_documents/4001907/waybill"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/waybill_documents/4001907/waybill
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"id": 4001907,
"type": "waybill",
"file_name": "4001907.pdf",
"pages": 1,
"mime": "application/pdf",
"size": 2605,
"created_at": "2019-05-29 18:41:11",
"image": "JVBERi0xLjMgCjEgMCBvYmoKPDwKL1BhZ2VzIDIgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagoyIDAgb2JqCjw8Ci9UeXBlIC9QYWdlcwovS2lkcyBbIDMgMCBSIF0KL0NvdW50IDEKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovUmVzb3VyY2VzIDw8Ci9YT2JqZWN0IDw8IC9JbTAgOCAwIFIgPj4KL1Byb2NTZXQgNiAwIFIgPj4KL01lZGlhQm94IFswIDAgMSAxXQovQ3JvcEJveCBbMCAwIDEgMV0KL0NvbnRlbnRzIDQgMCBSCi9UaHVtYiAxMSAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL0xlbmd0aCA1IDAgUgo+PgpzdHJlYW0KcQoxIDAgMCAxIDAgMCBjbQovSW0wIERvClEKCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iagoyNwplbmRvYmoKNiAwIG9iagpbIC9QREYgL1RleHQgL0ltYWdlQyBdCmVuZG9iago3IDAgb2JqCjw8Cj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9YT2JqZWN0Ci9TdWJ0eXBlIC9JbWFnZQovTmFtZSAvSW0wCi9GaWx0ZXIgWyAvRENURGVjb2RlIF0KL1dpZHRoIDEKL0hlaWdodCAxCi9Db2xvclNwYWNlIDEwIDAgUgovQml0c1BlckNvbXBvbmVudCA4Ci9MZW5ndGggOSAwIFIKPj4Kc3RyZWFtCv/Y/+AAEEpGSUYAAQEAAAEAAQAA/9sAQwAMCAkKCQcMCgoKDQ0MDhIeExIQEBIkGhsVHismLSwqJikpLzVEOi8yQDMpKTtRPEBGSUxNTC45VFpTSllES0xJ/8AACwgAAQABAQERAP/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAA/AFV//9kKZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjE2MAplbmRvYmoKMTAgMCBvYmoKL0RldmljZUdyYXkKZW5kb2JqCjExIDAgb2JqCjw8Ci9GaWx0ZXIgWyAvRENURGVjb2RlIF0KL1dpZHRoIDEKL0hlaWdodCAxCi9Db2xvclNwYWNlIDEwIDAgUgovQml0c1BlckNvbXBvbmVudCA4Ci9MZW5ndGggMTIgMCBSCj4+CnN0cmVhbQr/2P/gABBKRklGAAEBAAABAAEAAP/bAEMADAgJCgkHDAoKCg0NDA4SHhMSEBASJBobFR4rJi0sKiYpKS81RDovMkAzKSk7UTxARklMTUwuOVRaU0pZREtMSf/AAAsIAAEAAQEBEQD/xAAUAAEAAAAAAAAAAAAAAAAAAAAH/8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBVf//ZCmVuZHN0cmVhbQplbmRvYmoKMTIgMCBvYmoKMTYwCmVuZG9iagoxMyAwIG9iago8PAo+PgplbmRvYmoKMTQgMCBvYmoKMTYwCmVuZG9iagoxNSAwIG9iago8PAo+PgplbmRvYmoKMTYgMCBvYmoKMTYwCmVuZG9iagoxNyAwIG9iago8PAovVGl0bGUgPEZFRkYwMDYxMDAwMD4KL0NyZWF0aW9uRGF0ZSAoRDoyMDE5MDkxMTA2MjMxMykKL01vZERhdGUgKEQ6MjAxOTA5MTEwNjIzMTMpCi9Qcm9kdWNlciAoaHR0cHM6Ly9pbWFnZW1hZ2ljay5vcmcpCj4+CmVuZG9iagp4cmVmCjAgMTgKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4gCjAwMDAwMDAwNTkgMDAwMDAgbiAKMDAwMDAwMDExOCAwMDAwMCBuIAowMDAwMDAwMjkyIDAwMDAwIG4gCjAwMDAwMDAzNzIgMDAwMDAgbiAKMDAwMDAwMDM5MCAwMDAwMCBuIAowMDAwMDAwNDI4IDAwMDAwIG4gCjAwMDAwMDA0NDkgMDAwMDAgbiAKMDAwMDAwMDc4NSAwMDAwMCBuIAowMDAwMDAwODA0IDAwMDAwIG4gCjAwMDAwMDA4MzIgMDAwMDAgbiAKMDAwMDAwMTEyOCAwMDAwMCBuIAowMDAwMDAxMTQ4IDAwMDAwIG4gCjAwMDAwMDExNzAgMDAwMDAgbiAKMDAwMDAwMTE5MCAwMDAwMCBuIAowMDAwMDAxMjEyIDAwMDAwIG4gCjAwMDAwMDEyMzIgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxOAovSW5mbyAxNyAwIFIKL1Jvb3QgMSAwIFIKL0lEIFs8ZTAwZTVlYjk0NDQxODJmMzUyMzIzMzc0ZWY0ZTA4ZWJjYjc4NDcyNWZkZDRmZDYxMmQ3NzMwNTQwYjNlMGM4Yz4gPGUwMGU1ZWI5NDQ0MTgyZjM1MjMyMzM3NGVmNGUwOGViY2I3ODQ3MjVmZGQ0ZmQ2MTJkNzczMDU0MGIzZTBjOGM+XQo+PgpzdGFydHhyZWYKMTM3MwolJUVPRgo"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
8. Proofs of Delivery
Index
requires authentication requires headers
List your waybill proofs of delivery
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/proofs_of_delivery';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'page' => '1',
'per_page' => '3',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/proofs_of_delivery"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/proofs_of_delivery
?api_token=OpSjx5TlXGCGkzGAvUOm&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Get the details and base64 encoded image of the waybill proof of delivery
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/proofs_of_delivery/211515';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/proofs_of_delivery/211515"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/proofs_of_delivery/211515
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"id": 211515,
"type": "",
"file_name": "4001907_POD.pdf",
"pages": 1,
"mime": "application/pdf",
"size": 2605,
"created_at": "2019-05-29 18:41:11",
"image_url": "https://api.collivery.co.za/v3/proofs_of_delivery/211515",
"image": "JVBERi0xLjMgCjEgMCBvYmoKPDwKL1BhZ2VzIDIgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagoyIDAgb2JqCjw8Ci9UeXBlIC9QYWdlcwovS2lkcyBbIDMgMCBSIF0KL0NvdW50IDEKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovUmVzb3VyY2VzIDw8Ci9YT2JqZWN0IDw8IC9JbTAgOCAwIFIgPj4KL1Byb2NTZXQgNiAwIFIgPj4KL01lZGlhQm94IFswIDAgMSAxXQovQ3JvcEJveCBbMCAwIDEgMV0KL0NvbnRlbnRzIDQgMCBSCi9UaHVtYiAxMSAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL0xlbmd0aCA1IDAgUgo+PgpzdHJlYW0KcQoxIDAgMCAxIDAgMCBjbQovSW0wIERvClEKCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iagoyNwplbmRvYmoKNiAwIG9iagpbIC9QREYgL1RleHQgL0ltYWdlQyBdCmVuZG9iago3IDAgb2JqCjw8Cj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9YT2JqZWN0Ci9TdWJ0eXBlIC9JbWFnZQovTmFtZSAvSW0wCi9GaWx0ZXIgWyAvRENURGVjb2RlIF0KL1dpZHRoIDEKL0hlaWdodCAxCi9Db2xvclNwYWNlIDEwIDAgUgovQml0c1BlckNvbXBvbmVudCA4Ci9MZW5ndGggOSAwIFIKPj4Kc3RyZWFtCv/Y/+AAEEpGSUYAAQEAAAEAAQAA/9sAQwAMCAkKCQcMCgoKDQ0MDhIeExIQEBIkGhsVHismLSwqJikpLzVEOi8yQDMpKTtRPEBGSUxNTC45VFpTSllES0xJ/8AACwgAAQABAQERAP/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAA/AFV//9kKZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjE2MAplbmRvYmoKMTAgMCBvYmoKL0RldmljZUdyYXkKZW5kb2JqCjExIDAgb2JqCjw8Ci9GaWx0ZXIgWyAvRENURGVjb2RlIF0KL1dpZHRoIDEKL0hlaWdodCAxCi9Db2xvclNwYWNlIDEwIDAgUgovQml0c1BlckNvbXBvbmVudCA4Ci9MZW5ndGggMTIgMCBSCj4+CnN0cmVhbQr/2P/gABBKRklGAAEBAAABAAEAAP/bAEMADAgJCgkHDAoKCg0NDA4SHhMSEBASJBobFR4rJi0sKiYpKS81RDovMkAzKSk7UTxARklMTUwuOVRaU0pZREtMSf/AAAsIAAEAAQEBEQD/xAAUAAEAAAAAAAAAAAAAAAAAAAAH/8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBVf//ZCmVuZHN0cmVhbQplbmRvYmoKMTIgMCBvYmoKMTYwCmVuZG9iagoxMyAwIG9iago8PAo+PgplbmRvYmoKMTQgMCBvYmoKMTYwCmVuZG9iagoxNSAwIG9iago8PAo+PgplbmRvYmoKMTYgMCBvYmoKMTYwCmVuZG9iagoxNyAwIG9iago8PAovVGl0bGUgPEZFRkYwMDYxMDAwMD4KL0NyZWF0aW9uRGF0ZSAoRDoyMDE5MDkxMTA2MjMxMykKL01vZERhdGUgKEQ6MjAxOTA5MTEwNjIzMTMpCi9Qcm9kdWNlciAoaHR0cHM6Ly9pbWFnZW1hZ2ljay5vcmcpCj4+CmVuZG9iagp4cmVmCjAgMTgKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4gCjAwMDAwMDAwNTkgMDAwMDAgbiAKMDAwMDAwMDExOCAwMDAwMCBuIAowMDAwMDAwMjkyIDAwMDAwIG4gCjAwMDAwMDAzNzIgMDAwMDAgbiAKMDAwMDAwMDM5MCAwMDAwMCBuIAowMDAwMDAwNDI4IDAwMDAwIG4gCjAwMDAwMDA0NDkgMDAwMDAgbiAKMDAwMDAwMDc4NSAwMDAwMCBuIAowMDAwMDAwODA0IDAwMDAwIG4gCjAwMDAwMDA4MzIgMDAwMDAgbiAKMDAwMDAwMTEyOCAwMDAwMCBuIAowMDAwMDAxMTQ4IDAwMDAwIG4gCjAwMDAwMDExNzAgMDAwMDAgbiAKMDAwMDAwMTE5MCAwMDAwMCBuIAowMDAwMDAxMjEyIDAwMDAwIG4gCjAwMDAwMDEyMzIgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxOAovSW5mbyAxNyAwIFIKL1Jvb3QgMSAwIFIKL0lEIFs8ZTAwZTVlYjk0NDQxODJmMzUyMzIzMzc0ZWY0ZTA4ZWJjYjc4NDcyNWZkZDRmZDYxMmQ3NzMwNTQwYjNlMGM4Yz4gPGUwMGU1ZWI5NDQ0MTgyZjM1MjMyMzM3NGVmNGUwOGViY2I3ODQ3MjVmZGQ0ZmQ2MTJkNzczMDU0MGIzZTBjOGM+XQo+PgpzdGFydHhyZWYKMTM3MwolJUVPRgo"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
9. Parcel Images
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/parcel_images';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'page' => '1',
'per_page' => '3',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/parcel_images"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/parcel_images
?api_token=OpSjx5TlXGCGkzGAvUOm&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": [
{
"id": 2681479,
"waybill_id": 3012330,
"parcel_number": 1,
"file_name": "3012330-1.jpeg",
"mime_type": "image/jpeg",
"size": 26287,
"created_at": "2017-07-17 13:06:57",
"image_url": "https://api.collivery.co.za/v3/parcel_images/2681479"
},
{
"id": 2694043,
"waybill_id": 3041631,
"parcel_number": 1,
"file_name": "3041631-1.jpeg",
"mime_type": "image/jpeg",
"size": 32399,
"created_at": "2017-07-25 14:37:50",
"image_url": "https://api.collivery.co.za/v3/parcel_images/2694043"
},
{
"id": 2694087,
"waybill_id": 3041631,
"parcel_number": 2,
"file_name": "3041631-2.jpeg",
"mime_type": "image/jpeg",
"size": 34726,
"created_at": "2017-07-25 14:52:37",
"image_url": "https://api.collivery.co.za/v3/parcel_images/2694087"
}
],
"links": {
"first": "https://api.collivery.co.za/v3/parcel_images?page=1",
"last": "https://api.collivery.co.za/v3/parcel_images?page=2",
"next": "https://api.collivery.co.za/v3/parcel_images?page=2",
"prev": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://api.collivery.co.za/v3/parcel_images",
"per_page": "3",
"to": 3,
"total": 6
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Get the base64 encoded image
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/parcel_images/8';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/parcel_images/8"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/parcel_images/8
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": {
"file_name": "3041631-1.jpeg",
"mime_type": "image/jpeg",
"image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUFBQUFBQUGBgUICAcICAsKCQkKCxEMDQwNDBEaEBMQEBMQGhcbFhUWGxcpIBwcICkvJyUnLzkzMzlHREddXX0BBQUFBQUFBQYGBQgIBwgICwoJCQoLEQwNDA0MERoQExAQExAaFxsWFRYbFykgHBwgKS8nJScvOTMzOUdER11dff/CABEIAAEAAQMBIgACEQEDEQH/xAAUAAEAAAAAAAAAAAAAAAAAAAAI/9oACAEBAAAAAGX/AP/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIQAAAAf//EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMQAAAAf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Af//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Af//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Af//Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
10. Country
Show and search for countries
Index
requires authentication requires headers
Show all countries
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/country';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'page' => '1',
'per_page' => '3',
],
'json' => [
'search' => 'south',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/country"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"search": "south"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/country
?api_token=OpSjx5TlXGCGkzGAvUOm&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"search":"south"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
11. Towns
Show and search for Towns
Index
requires authentication requires headers
Show all towns for a country or search towns.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/towns';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'page' => '1',
'per_page' => '3',
],
'json' => [
'country' => 'ZAF',
'province' => 'Gauteng',
'search' => 'Joh',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/towns"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"country": "ZAF",
"province": "Gauteng",
"search": "Joh"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/towns
?api_token=OpSjx5TlXGCGkzGAvUOm&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"country":"ZAF","province":"Gauteng","search":"Joh"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
12. Suburbs
Show and filter suburbs
Index
requires authentication requires headers
Show all suburbs for a town or country or search suburbs.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/suburbs';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'page' => '1',
'per_page' => '3',
],
'json' => [
'town_id' => '147',
'country' => 'ZAF',
'latitude' => '-26.212500',
'longitude' => '28.037500',
'postal_code' => '2000',
'postal_code_range' => '100',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/suburbs"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"town_id": "147",
"country": "ZAF",
"latitude": "-26.212500",
"longitude": "28.037500",
"postal_code": "2000",
"postal_code_range": "100"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/suburbs
?api_token=OpSjx5TlXGCGkzGAvUOm&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"town_id":"147","country":"ZAF","latitude":"-26.212500","longitude":"28.037500","postal_code":"2000","postal_code_range":"100"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Show details of one particular suburb. Loaded with Town details included
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/suburbs/-1';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/suburbs/-1"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/suburbs/-1
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Search
requires authentication requires headers
Search by name for suburbs and/or town. Results are returned in order of most populated areas by default
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/town_suburb_search';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'search_text' => 'westcli',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/town_suburb_search"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"search_text": "westcli"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/town_suburb_search
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"search_text":"westcli"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
13. Service Types
Show all service types or searched
Index
requires authentication requires headers
Get available service types with delivery days
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/service_types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/service_types"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/service_types
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Get specific service type by id
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/service_type/2';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/service_type/2"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/service_type/2
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
14. Location Types
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/location_types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'search' => 'business',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/location_types"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"search": "business",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/location_types
?api_token=OpSjx5TlXGCGkzGAvUOm&search=business
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
15. Battery Types
Index Get all battery types.
requires authentication requires headers
Get all battery types, to be used when booking a waybill. Should be aggressively cached, or even statically defined.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/battery_types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/battery_types"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/battery_types
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
16. Parcel Types
Index
requires authentication requires headers
Get all parcel types, to be used when booking a waybill. Should be aggressively cached, or even statically defined.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/parcel_types';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/parcel_types"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/parcel_types
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
17. Terms and Conditions
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/terms_and_conditions';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/terms_and_conditions"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/terms_and_conditions
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
18. Vendors
Manage Vendors
Index
requires authentication requires headers
Show all vendors, or all vendors of a certain type
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendors';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'vendor_type' => 'TAK_SUP',
'vendor_id' => '123152',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendors"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"vendor_type": "TAK_SUP",
"vendor_id": "123152"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/vendors
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"vendor_type":"TAK_SUP","vendor_id":"123152"}'
Example response (200):
{
"data": [
{
"id": 1770,
"vendor_type": "TAK_SUP",
"vendor_id": 32143451,
"verified": false,
"deleted": false
},
{
"id": 1774,
"vendor_type": "TAK_SUP",
"vendor_id": 32143451,
"verified": false,
"deleted": false
},
{
"id": 1775,
"vendor_type": "TAK_SUP",
"vendor_id": 32143451,
"verified": false,
"deleted": false
},
{
"id": 1776,
"vendor_type": "TAK_SUP",
"vendor_id": 32143451,
"verified": false,
"deleted": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendors';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'vendor_type' => 'TAK_SUP',
'vendor_id' => '123152',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendors"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"vendor_type": "TAK_SUP",
"vendor_id": "123152"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/vendors
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"vendor_type":"TAK_SUP","vendor_id":"123152"}'
Example response (200):
{
"data": [
{
"id": 1770,
"vendor_type": "TAK_SUP",
"vendor_id": 123152,
"verified": false,
"deleted": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendors/123152';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'vendor_type' => 'TAK_SUP',
'vendor_id' => '123152',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendors/123152"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"vendor_type": "TAK_SUP",
"vendor_id": "123152"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/vendors/123152
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"vendor_type":"TAK_SUP","vendor_id":"123152"}'
Example response (200):
{
"data": [
{
"id": 1770,
"vendor_type": "TAK_SUP",
"vendor_id": 123152,
"verified": false,
"deleted": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Destroy
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendors/4';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendors/4"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json()); curl -X DELETE \
"https://dev.api.collivery.co.za/v3/vendors/4
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": [
{
"id": 1770,
"vendor_type": "TAK_SUP",
"vendor_id": 123152,
"verified": false,
"deleted": true
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
19. Vendor Reports
View
Index
requires authentication requires headers
List of Takealot waybills
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor/reports';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'per_page' => 9,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor/reports"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"per_page": 9
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/vendor/reports
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"per_page":9}'
Example response (200):
{
"data": [
{
"waybill": 5518724,
"purchase_orders": [
{
"po": "12345678",
"asn": null,
"due_date": "2021-10-25",
"quantity": 1
},
{
"po": "12345679",
"asn": null,
"due_date": "2021-10-25",
"quantity": 2
},
{
"po": "12345673",
"asn": null,
"due_date": "2021-10-25",
"quantity": 1
},
{
"po": "12345674",
"asn": null,
"due_date": "2021-10-25",
"quantity": 2
},
{
"po": "12345672",
"asn": null,
"due_date": "2021-10-25",
"quantity": 1
}
],
"client": "Nuoli",
"waybill_quantity": 7,
"service": "Road Freight",
"status": "Quote Accepted",
"sla_status": "not delivered"
}
],
"meta": {
"next_url": null,
"previous_url": null,
"pages": 0
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
OnTime
requires authentication requires headers
On time report for Takealot Waybills
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor/reports/on_time';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'direction' => 'collection',
'distribution_center' => 'DBN Main DC',
'po_number_search' => 'ex',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor/reports/on_time"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"direction": "collection",
"distribution_center": "DBN Main DC",
"po_number_search": "ex"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/vendor/reports/on_time
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"direction":"collection","distribution_center":"DBN Main DC","po_number_search":"ex"}'
Example response (200):
{
"data": [
{
"waybill": 5674754,
"status": "Invoiced",
"po": "12345678",
"asn": "1",
"client": "Acme Trading (Pty) Ltd",
"quantity": 1,
"service": "Road Freight",
"due_date": "2022-01-06",
"collection_time": "2022-01-05 09:00:00",
"collected_at": "2022-01-05 13:44:58",
"deliver_before": "2022-01-6 14:00:00",
"days_late": 2
}
],
"meta": {
"summary": {
"total_failures": 0,
"total": 1,
"percentage": 0
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
InFull
requires authentication requires headers
In full report for Takealot Waybills
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor/reports/in_full';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'direction' => 'collection',
'distribution_center' => 'DBN Main DC',
'po_number_search' => 'ex',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor/reports/in_full"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"direction": "collection",
"distribution_center": "DBN Main DC",
"po_number_search": "ex"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/vendor/reports/in_full
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"direction":"collection","distribution_center":"DBN Main DC","po_number_search":"ex"}'
Example response (200):
{
"data": [
{
"waybill": 5504810,
"status": "Invoiced",
"po": "34456899",
"asn": null,
"client": "Acme Trading Pty Ltd",
"quantity": 2,
"service": "Road Freight",
"quantity_at_dest": 0
},
{
"waybill": 5504810,
"status": "Invoiced",
"po": "123789",
"asn": null,
"client": "Acme Trading Pty Ltd",
"quantity": 2,
"service": "Road Freight",
"quantity_at_dest": 0
},
{
"waybill": 5504810,
"status": "Invoiced",
"po": "23456789",
"asn": null,
"client": "Acme Trading Pty Ltd",
"quantity": 2,
"service": "Road Freight",
"quantity_at_dest": 0
}
],
"meta": {
"summary": {
"failures": 3,
"total": 137961,
"percentage": 0
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
LostOrDamaged
requires authentication requires headers
Lost or damaged report for Takealot Waybills including claim status
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor/reports/lost_or_damaged';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'direction' => 'collection',
'distribution_center' => 'DBN Main DC',
'po_number_search' => 'ex',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor/reports/lost_or_damaged"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"direction": "collection",
"distribution_center": "DBN Main DC",
"po_number_search": "ex"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/vendor/reports/lost_or_damaged
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"direction":"collection","distribution_center":"DBN Main DC","po_number_search":"ex"}'
Example response (200):
{
"data": [
{
"waybill": 4899591,
"status": "Invoiced",
"po": "12312351",
"asn": "ASNCQWERT036712920",
"client": "Acme Trading Pty Ltd",
"quantity": 2,
"service": "Road Freight",
"claim_approved": false,
"claim_value_rands": 400,
"claim_status": "Denied",
"claim_reason": "Dear Acme, it appears the item was not packaged in line with TakeAlot packaging standards. Unfortunately we are unable to assist with the claim"
},
{
"waybill": 4909021,
"status": "Invoiced",
"po": "3622220",
"asn": null,
"client": "Acme Trading Pty Ltd",
"quantity": 2,
"service": "Road Freight",
"claim_approved": true,
"claim_value_rands": 3995,
"claim_status": "Completed",
"claim_reason": "Dear Acme, thank you for submitted your claim. After review of the photographic evidence your claim has been approved. Please supply invoice for cost"
}
],
"meta": {
"summary": {
"claims_total": 2,
"accepted_total": 1,
"rejected_total": 1,
"total": 2590,
"percentage": 0.04
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
20. Vendor Waybills
Add Vendor Waybill bookings
Store
requires authentication requires headers
Create a new vendor waybill
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor_bookings';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'vendor_depot' => 'JHB Bulk DC3',
'vehicle_type' => 2,
'risk_cover' => true,
'collection_time' => '2025-01-24',
'orders' => [
[
'purchase_order_number' => 'ex',
'parcel_count' => 2,
'vendor_id' => 1772,
'due_date' => '2012-02-25',
'asn' => 'ex',
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.5,
],
],
'delivery_address' => '952',
'service_type' => 3,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor_bookings"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"vendor_depot": "JHB Bulk DC3",
"vehicle_type": 2,
"risk_cover": true,
"collection_time": "2025-01-24",
"orders": [
{
"purchase_order_number": "ex",
"parcel_count": 2,
"vendor_id": 1772,
"due_date": "2012-02-25",
"asn": "ex",
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.5
}
],
"delivery_address": "952",
"service_type": 3
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/vendor_bookings
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"vendor_depot":"JHB Bulk DC3","vehicle_type":2,"risk_cover":true,"collection_time":"2025-01-24","orders":[{"purchase_order_number":"ex","parcel_count":2,"vendor_id":1772,"due_date":"2012-02-25","asn":"ex","length":21.5,"width":10,"height":5.5,"weight":5.5}],"delivery_address":"952","service_type":3}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quote
requires authentication requires headers
Quote on a vendor waybill
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/vendor_bookings/quote';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'vendor_depot' => 'JHB Bulk DC3',
'vehicle_type' => 2,
'risk_cover' => true,
'collection_time' => '2025-01-24',
'orders' => [
[
'purchase_order_number' => 'ex',
'parcel_count' => 2,
'vendor_id' => 1772,
'due_date' => '2012-02-25',
'asn' => 'ex',
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.5,
],
],
'delivery_address' => '952',
'service_types' => [
2,
5,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/vendor_bookings/quote"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"vendor_depot": "JHB Bulk DC3",
"vehicle_type": 2,
"risk_cover": true,
"collection_time": "2025-01-24",
"orders": [
{
"purchase_order_number": "ex",
"parcel_count": 2,
"vendor_id": 1772,
"due_date": "2012-02-25",
"asn": "ex",
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.5
}
],
"delivery_address": "952",
"service_types": [
2,
5
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/vendor_bookings/quote
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"vendor_depot":"JHB Bulk DC3","vehicle_type":2,"risk_cover":true,"collection_time":"2025-01-24","orders":[{"purchase_order_number":"ex","parcel_count":2,"vendor_id":1772,"due_date":"2012-02-25","asn":"ex","length":21.5,"width":10,"height":5.5,"weight":5.5}],"delivery_address":"952","service_types":[2,5]}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
21. Statuses
View Statuses
Index
requires authentication requires headers
List all in use statuses
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/statuses';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/statuses"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/statuses
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
22. WebPrinter
Get your Printers Available and execute jobs
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/web_printer';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/web_printer"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/web_printer
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
23. Predefined Parcels
Manage Predefined Parcels
Index
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/predefined_parcels';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
'search' => 'pizza',
'page' => '1',
'per_page' => '3',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/predefined_parcels"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
"search": "pizza",
"page": "1",
"per_page": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/predefined_parcels
?api_token=OpSjx5TlXGCGkzGAvUOm&search=pizza&page=1&per_page=3
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (200):
{
"data": [
{
'product_id': 1,
'client_id': 1,
'description': 'Small Pizza Box',
'length': 20,
'width': 20,
'height': 20,
'weight': 1,
'deleted': false
},
{
'product_id': 2,
'client_id': 1,
'description': 'Medium Pizza Box',
'length': 30,
'width': 30,
'height': 30,
'weight': 2,
'deleted': false
}
],
"links": {
'first': 'http://collivery.net/api/external/predefined-parcels?page=1',
'last': 'http://collivery.net/api/external/predefined-parcels?page=1',
'prev': null,
'next': null
},
"meta": {
'current_page': 1,
'from': 1,
'last_page': 1,
'path': 'http://collivery.net/api/external/predefined-parcels',
'per_page': 100,
'to': 2,
'total': 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store
requires authentication requires headers
Save a new Predefined Parcel.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/predefined_parcels';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.2,
'description' => 'Pizza box',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/predefined_parcels"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.2,
"description": "Pizza box"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X POST \
"https://dev.api.collivery.co.za/v3/predefined_parcels
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"length":21.5,"width":10,"height":5.5,"weight":5.2,"description":"Pizza box"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/predefined_parcels/13900';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/predefined_parcels/13900"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/predefined_parcels/13900
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update
requires authentication requires headers
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/predefined_parcels/13900';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
'json' => [
'length' => 21.5,
'width' => 10.0,
'height' => 5.5,
'weight' => 5.2,
'description' => 'Pizza box',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/predefined_parcels/13900"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
let body = {
"length": 21.5,
"width": 10,
"height": 5.5,
"weight": 5.2,
"description": "Pizza box"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json()); curl -X PUT \
"https://dev.api.collivery.co.za/v3/predefined_parcels/13900
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" \
-d '{"length":21.5,"width":10,"height":5.5,"weight":5.2,"description":"Pizza box"}'
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
24. Delivery Methods
Show available delivery methods
Index
requires authentication requires headers
Get available delivery methods
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dev.api.collivery.co.za/v3/delivery_methods';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-App-Name' => 'My Custom App',
'X-App-Version' => '0.2.1',
'X-App-Host' => '.NET Framework 4.8',
'X-App-Lang' => 'C#',
'X-App-Url' => 'https://example.com',
],
'query' => [
'api_token' => 'OpSjx5TlXGCGkzGAvUOm',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); const url = new URL(
"https://dev.api.collivery.co.za/v3/delivery_methods"
);
const params = {
"api_token": "OpSjx5TlXGCGkzGAvUOm",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-App-Name": "My Custom App",
"X-App-Version": "0.2.1",
"X-App-Host": ".NET Framework 4.8",
"X-App-Lang": "C#",
"X-App-Url": "https://example.com",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json()); curl -X GET \
-G "https://dev.api.collivery.co.za/v3/delivery_methods
?api_token=OpSjx5TlXGCGkzGAvUOm
" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-App-Name: My Custom App" \
-H "X-App-Version: 0.2.1" \
-H "X-App-Host: .NET Framework 4.8" \
-H "X-App-Lang: C#" \
-H "X-App-Url: https://example.com" Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.