Example JSON Representation

{
  "id":549,
  "type_id": 1,
  "name":"New Brand",
  "approved":true
}

Supported Formats

json

GET /brands
List brands

Supported Formats

json

Errors

Code Description
400 The request was unacceptable, often due to missing a required parameter.

Examples

GET /brands
200
{
  "pagination": {
    "per_page": 25,
    "total_pages": 0,
    "total_objects": 0
  },
  "brands": []
}

Params

Param name Description
page
optional

Validations:

  • Must be Integer.

per_page
optional

Validations:

  • Must be Integer.

name
optional

List brands with names matching the provided string.

Validations:

  • Must be a String

name_like
optional

List brands with names matching, or similar to, the provided string. Slower, but useful for correcting user input.

Validations:

  • Must be a String

approved
optional

Validations:

  • Must be true or false.

pending
optional

Validations:

  • Must be true or false.

in_use
optional

Only return brands that have one or more instrument.

Validations:

  • Must be true or false.

in_serial_lookup
optional

Only return brands that have one or more serial number ranges defined.

Validations:

  • Must be true or false.


GET /brands/:id
Show a brand

Supported Formats

json

Errors

Code Description
400 The request was unacceptable, often due to missing a required parameter.

Examples

GET /brands/4291
200
{
  "id": 4291,
  "name": "Breph7f0e927d-3759-4d26-bc7a-710bc9e6cf7a",
  "approved": true,
  "type": "Guitars"
}

POST /brands
Create a brand

Supported Formats

json

Errors

Code Description
400 The request was unacceptable, often due to missing a required parameter.

Examples

curl -X POST -H "Authorization: XXXX" -H "Content-Type: application/json" -d '{"name": "New Brand"}' "https://api.axefax.com/brands"

Response:

{
  "brand":{
    "id":549,
    "type_id": 1,
    "name":"New Brand",
    "approved":false
  }
}
      
POST /brands
{
  "name": "Panasche09ed6ef9-4114-417f-8b97-78de243791d9",
  "type": {
    "id": 12074,
    "name": "Guitars",
    "subdomain": "guitars"
  },
  "brand": {
    "name": "Panasche09ed6ef9-4114-417f-8b97-78de243791d9"
  }
}
201
{
  "id": 4292,
  "name": "Panasche09ed6ef9-4114-417f-8b97-78de243791d9",
  "approved": false,
  "type": "Guitars"
}

Params

Param name Description
name
required

Validations:

  • Must be a String

type_id
optional

Brand type. Only necessary if you are using the generic API (api.axefax.com)

Validations:

  • Must be Integer.


PUT /brands/:id
Update a brand

Supported Formats

json

Errors

Code Description
400

Examples

PATCH /brands/4294
{
  "name": "Fender",
  "brand": {
    "name": "Fender"
  }
}
202
{
  "id": 4294,
  "name": "Fender",
  "approved": false,
  "type": "Guitars"
}

Params

Param name Description
name
required

Validations:

  • Must be a String

type_id
optional

Brand type. Only necessary if you are using the generic API (api.axefax.com)

Validations:

  • Must be Integer.


DELETE /brands/:id
Destroy a brand

Supported Formats

json

Errors

Code Description
400 The request was unacceptable, often due to missing a required parameter.
405

Examples

DELETE /brands/4299
{
  "brand": {}
}
204