Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

List the Brands

Lists the Brands of your organization, newest first. Each row gives the slug, the name, the description, the logo URL, and whether the body has content. This call does not give the body. To read it, read one Brand. Deleted Brands are not in the list. Each row gives its Assignees.

One page at a time: limit rows at most, 100 by default. When the answer holds nextCursor, more rows exist: send it back as cursor to get the next page.

GET/context/brands
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Query parameters
cursorstring
min length 1
limitintegerrequired
min 1 · max 500 · default: 100
assigneestring
Responses
200

One page of the Brands of the organization, newest first. hasBody says whether the body carries prose, so a chooser can rank Brands without the listing becoming the brief. logoUrl is the public address of the Document the Brand nominates, and it is null when it nominates none. This page is the last one, so it carries no nextCursor.

dataobject[]required
Show properties
Array of object
assigneesobject[]required

The current members who are accountable for the record, oldest first, at most 10. An Assignee grants no access. A member who left is not listed.

Show properties
Array of object
idstringrequired

The usr_… id of the member.

namestringrequired

The name of the member.

descriptionstringrequired
hasBodybooleanrequired

Whether the body carries prose. An unwritten body is a normal state, not a deficit.

idstringrequired

The id of the Brand, brd_….

logoUrlstring | nullrequired

The Brand’s nominated logo, when it has one.

namestringrequired
slugstringrequired
nextCursorstring

Send this value as cursor to get the next page. It is absent on the last page.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed. Or AdCrunch cannot use the cursor: it cannot read it, or the cursor belongs to a different query. Then error is invalid_cursor. Send the nextCursor of the previous page with no change, or omit cursor to get the first page.

Any of:
object
issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

object
errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_cursor
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:organization_unentitled
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold brand:read. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X GET 'https://api.adcrunch.dev/context/brands?limit=100' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "data": [
    {
      "assignees": [
        {
          "id": "usr_4d8b12",
          "name": "Maya Lindqvist"
        }
      ],
      "description": "Running shoes sold direct to the runner, made to last a thousand kilometres.",
      "hasBody": true,
      "id": "brd_6a9c33",
      "logoUrl": "https://documents.adcrunch.dev/org_3a7f10/doc_5e2b41",
      "name": "Acme",
      "slug": "acme"
    },
    {
      "assignees": [],
      "description": "The trail range of Acme, sold to runners who leave the road.",
      "hasBody": false,
      "id": "brd_8f21d0",
      "logoUrl": null,
      "name": "Acme Trail",
      "slug": "acme-trail"
    }
  ]
}