openapi: 3.0.3
info:
title: Brandtrack API Documentation Accounts API
description: This is the official documentation for the Brandtrack API.
version: 1.0.0
servers:
- url: api.brandtrack.fm
security:
- default: []
tags:
- name: Accounts
description: ''
paths:
/v2/accounts:
get:
summary: List accounts
operationId: listAccounts
description: Return a paginated list of accounts available for the authenticated user.
parameters:
- in: query
name: page
description: The page requested. Default to 1.
example: 1
required: false
schema:
type: integer
description: The page requested. Default to 1.
example: 1
nullable: false
- in: query
name: per_page
description: The number of items per page. Default to 25.
example: 100
required: false
schema:
type: integer
description: The number of items per page. Default to 25.
example: 100
nullable: false
- in: query
name: order_by
description: The field to order the results by. Default to id.
example: id
required: false
schema:
type: string
description: The field to order the results by. Default to id.
example: id
nullable: false
- in: query
name: direction
description: The direction method to sort results. Default to asc.
example: desc
required: false
schema:
type: string
description: The direction method to sort results. Default to asc.
example: desc
nullable: false
- in: header
name: x-customer-api-key
description: ''
example: '{YOUR_AUTH_KEY}'
schema:
type: string
responses: {}
tags:
- Accounts
/v2/accounts/{id}:
parameters:
- in: path
name: id
description: The ID of the account.
example: 19120
required: true
schema:
type: integer
get:
summary: Get an account by its ID
operationId: getAnAccountByItsID
description: Return a single account by its ID, if available to the authenticated user.
parameters:
- in: query
name: using_account_id
description: Set this ID to filter records only to this particular account. By not providing anything, results from all accounts will be returned. Default to null.
example: 0
required: false
schema:
type: integer
description: Set this ID to filter records only to this particular account. By not providing anything, results from all accounts will be returned. Default to null.
example: 0
nullable: false
- in: header
name: x-customer-api-key
description: ''
example: '{YOUR_AUTH_KEY}'
schema:
type: string
responses:
404:
description: Wrong ID
content:
application/json:
schema:
type: object
example:
message: 404 Not Found
status_code: 404
properties:
message:
type: string
example: 404 Not Found
status_code:
type: integer
example: 404
tags:
- Accounts
patch:
summary: Update an account
operationId: updateAnAccount
description: Only values provided in the request will be updated.
parameters:
- in: header
name: x-customer-api-key
description: ''
example: '{YOUR_AUTH_KEY}'
schema:
type: string
responses:
200:
description: Success
content:
application/json:
schema:
type: object
example:
data:
id: 19120
name: John's Bakery US
country: US
suspended: false
source: null
properties:
data:
type: object
properties:
id:
type: integer
example: 19120
name:
type: string
example: John's Bakery US
country:
type: string
example: US
suspended:
type: boolean
example: false
source:
type: string
example: null
403:
description: Wrong ID
content:
application/json:
schema:
type: object
example:
message: This action is unauthorized.
status_code: 403
properties:
message:
type: string
example: This action is unauthorized.
status_code:
type: integer
example: 403
tags:
- Accounts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Must not be greater than 100 characters.
example: lmgyeixauzqovl
nullable: false
/v2/accounts/{id}/suspension:
parameters:
- in: path
name: id
description: The ID of the account.
example: 19120
required: true
schema:
type: integer
post:
summary: Handle account suspension status
operationId: handleAccountSuspensionStatus
description: By providing the bool value, you can set or unset the suspension status for an account.
parameters:
- in: header
name: x-customer-api-key
description: ''
example: '{YOUR_AUTH_KEY}'
schema:
type: string
responses:
200:
description: Success
content:
application/json:
schema:
type: object
example:
data:
id: 19120
name: John's Bakery US
country: US
suspended: false
source: null
properties:
data:
type: object
properties:
id:
type: integer
example: 19120
name:
type: string
example: John's Bakery US
country:
type: string
example: US
suspended:
type: boolean
example: false
source:
type: string
example: null
404:
description: Wrong ID
content:
application/json:
schema:
type: object
example:
message: 404 Not Found
status_code: 404
properties:
message:
type: string
example: 404 Not Found
status_code:
type: integer
example: 404
409:
description: Suspension issue
content:
application/json:
schema:
type: object
example:
message: You can't set a suspension to an already suspended account.
status_code: 409
properties:
message:
type: string
example: You can't set a suspension to an already suspended account.
status_code:
type: integer
example: 409
tags:
- Accounts
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
suspended:
type: boolean
description: ''
example: false
nullable: false
required:
- suspended
components:
securitySchemes:
default:
type: apiKey
name: x-customer-api-key
in: header
description: If are not sure about how to get your token feel free to contact our team.