List brands
Get the list of brands
URL: https://api.courier.com/brands
Method: GET
Query Parameters
cursorstring
A unique identifier that allows for fetching the next set of brands.
Response
status: 200 OK
pagingobject
+ Show Properties
resultsarray
An array of brands
+ Show Properties
Request Example
- cURL
- Node.js
- Ruby
- Python
- Go
- PHP
curl --request GET \
--url https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA \
--header 'Accept: application/json'
// Dependencies to install:
// $ npm install node-fetch --save
const fetch = require('node-fetch');
const options = {
method: 'GET',
headers: {
Accept: 'application/json'
},
};
fetch('https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
response = http.request(request)
puts response.read_body
# Dependencies to install:
# $ python -m pip install requests
import requests
url = "https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA"
headers = {
"Accept": "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA"
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Accept", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
// Dependencies to install:
// $ composer require guzzlehttp/guzzle
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.courier.com/brands?cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA', [
'headers' => [
'Accept' => 'application/json',
],
]);
echo $response->getBody();
Responses Example
{
"paging": {
"cursor": "MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA==",
"more": true
},
"results": [
{
"created": 1591753605265,
"id": "C8CPX6HQZ5M7Q5KAMW5CXC4N98DH",
"name": "Example Brand Name",
"published": 1591753605265,
"settings": {
"colors": {
"primary": "#9D3789",
"secondary": "#9D3789",
"tertiary": "#9D3789"
},
"inapp": {
"preferences": {
"templateIds": [
null
]
}
},
"email": {
"footer": {
"markdown": "**Bold** and _italic_ with a [link](https://www.courier.com)",
"social": {
"facebook": {
"url": "https://www.facebook.com/example"
},
"instagram": {
"url": "https://www.instagram.com/example"
},
"linkedin": {
"url": "https://www.linkedin.com/example"
},
"medium": {
"url": "https://www.medium.com/example"
},
"twitter": {
"url": "https://www.twitter.com/example"
}
}
},
"header": {
"barColor": "#9D3789",
"logo": {
"href": "https://www.courier.com",
"image": "https://www.courier.com/logo.png"
}
}
}
},
"updated": 1591753605265,
"snippets": {
"items": [
{}
]
},
"version": "2020-06-19T18:51:36.083Z"
}
]
}
Example
Method: GET
URL: https://api.courier.com/brands