Get brand
URL: https://api.courier.com/brands/:brand_id
Method: GET
Path Parameters
brand_idstringrequired
A unique identifier associated with the brand you wish to retrieve.
Responses
status: 200 Successfully retrieved
creatednumber
The date/time of when the brand was created. Represented in milliseconds since Unix epoch.
idstring
Brand Identifier
namestringrequired
Brand name
publishednumber
The date/time of when the brand was published. Represented in milliseconds since Unix epoch.
settingsobject
+ Show Properties
updatednumber
The date/time of when the brand was updated. Represented in milliseconds since Unix epoch.
snippetsobject
+ Show Properties
versionstring
The version identifier for the brand
status: 404 Not Found
messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.
Request Example
- cURL
- Node.js
- Ruby
- Python
- Go
- PHP
curl --request GET \
--url https://api.courier.com/brands/:brand_id \
--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/:brand_id', 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/:brand_id")
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/:brand_id"
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/:brand_id"
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/:brand_id', [
'headers' => [
'Accept' => 'application/json',
],
]);
echo $response->getBody();
Responses Example
{
"created": 1591753605265,
"id": "C8CPX6HQZ5M7Q5KAMW5CXC4N98DH",
"name": "Example Brand Name",
"published": 1591753605265,
"settings": {
"colors": {
"primary": "#9D3789",
"secondary": "#9D3789",
"tertiary": "#9D3789"
},
"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"
}
{
"message": "Not Found",
"type": "invalid_request_error"
}