Example JSON Representation

{
  "id": 1846,
  "approved": true,
  "trait_values": {
    "fingerboard_inlay": [
      "Dots-centered"
    ],
    "number_of_strings": [
      "6"
    ],
    "number_of_pickups": [
      "1"
    ],
    "pickup_1": [
      "Transducer",
      "Magnetic"
    ],
    "soundhole": [
      "4 Crescent-Shaped"
    ],
    "body_shape": [
      "Dobro Woodbody Guitar Shape"
    ]
  },
  "year_start": 1954,
  "year_end": 1954,
  "brand": {
    "id": 2,
    "name": "Fender",
    "approved": true
  },
  "model": {
    "id": 2530,
    "name": "1954 Stratocaster",
    "approved": true,
    "brand_id": 2
  },
  "submodel": null,
  "images": []
}

Supported Formats

json

GET /instruments
List and filter instruments.

You must provide a brand or brand_id and a model or model_id to retrieve results. If you are using admin credentials to access the API you may omit these parameters but you should consider caching the results within your application. In addition to filtering based on the parameters below, you can pass <trait_name>:<trait value id> to filter by any instrument trait.

Supported Formats

json

Errors

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

Examples

curl -X GET -H "Authorization: XXXXX" "https://api.axefax.com/instruments?brand=fender&serial_number=4900&model_id=2530"

{
  "pagination": {
    "per_page": 25,
    "total_pages": 1,
    "total_objects": 6
  },
  "instruments": [
    {
      "id": 1846,
      "approved": true,
      "trait_values": {
        "fingerboard_inlay": [
          "Dots-centered"
        ],
        "number_of_strings": [
          "6"
        ],
        "number_of_pickups": [
          "1"
        ],
        "pickup_1": [
          "Transducer",
          "Magnetic"
        ],
        "soundhole": [
          "4 Crescent-Shaped"
        ],
        "body_shape": [
          "Dobro Woodbody Guitar Shape"
        ]
      },
      "year_start": 1954,
      "year_end": 1954,
      "brand": {
        "id": 2,
        "name": "Fender",
        "approved": true
      },
      "model": {
        "id": 2530,
        "name": "1954 Stratocaster",
        "approved": true,
        "brand_id": 2
      },
      "submodel": null,
      "images": []
    },
    ....
  ],
  "serial_number_ranges": [
    {
      "id": 122,
      "name": "FENDER",
      "years": "1950 - 1954",
      "brand_id": 2,
      "created_at": "2016-01-12T22:27:43.964Z",
      "updated_at": "2016-01-12T22:28:08.424Z",
      "instrument_id": null
    }
  ]
}
]
      

Params

Param name Description
page
optional

Value:

Must be Integer.

per_page
optional

Value:

Must be Integer.

name
optional

Value:

Must be String

shallow
optional

Pass true to include trait values, or false to include the IDs of values (faster). Default: false.


Value:

Must be true or false.

brand
optional

Filter based on a brand name


Value:

Must be String

brand_id
optional

Filter based on a brand id


Value:

Must be Integer.

model_id
optional

Filter based on a model id


Value:

Must be Integer.

submodel_id
optional

Filter based on a submodel id


Value:

Must be Integer.

year
optional

Filter based on a year


Value:

Must be Integer.

serial_number
optional

Filter based on a year provided by a serial number


Value:

Must be String

approved
optional

Value:

Must be true or false.

pending
optional

Value:

Must be true or false.


GET /instruments/traits-with-variance
List the distinict values possible for each trait for instruments matching the filters.

You must provide a brand or brand_id and a model or model_id to retrieve possible traits. Ideally, your application should fetch /traits-with-variance once the user has selected a brand, model and/or submodel. If you are using admin credentials to access the API you may omit these parameters but you should consider caching the results within your application.

By default, this API returns a set of possibilities for every trait. If you only need information about one trait, or a handful of traits, use the only parameter to improve performance (ex: ?only=fingerboard_inlay,truss_rod)

Supported Formats

json

Errors

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

Examples

curl -X GET -H "Authorization: XXXXX" "https://api.axefax.com/instruments/traits-with-variance?brand=fender&model=Stratocaster&serial_number=4900"

{
  "number_of_strings": [
    {
      "id": 1954,
      "value": "6",
      "description": "None provided."
    }
  ],
  "body_shape": [
    {
      "id": 36,
      "value": "Stratocaster",
      "description": "None provided."
    }
  ],
  "top": [
    {
      "id": 2303,
      "value": "13 Body 27 Top",
      "description": "None provided."
    },
    {
      "id": 2305,
      "value": "8 Body 27 Top",
      "description": "None provided."
    }
  ],
  "back_and_sides": [],
  "body_width": [],
  "body_length": [],
  "body_thickness": [],
  "soundhole": [
    {
      "id": 264,
      "value": "None",
      "description": "None provided."
    }
  ],
  ...
}
      

Params

Param name Description
shallow
optional

Pass true to include trait values, or false to include the IDs of values (faster). Default: false.


Value:

Must be true or false.

only
optional

Pass a comma-separated list of trait keys to look up variance for only those traits. Limiting your search can make the API much faster. For ex: &only=fingerboard_inlay,truss_rod


Value:

Must be String

brand
optional

Filter based on a brand name


Value:

Must be String

brand_id
optional

Filter based on a brand id


Value:

Must be Integer.

model
optional

Filter based on a model name


Value:

Must be String

model_id
optional

Filter based on a model id


Value:

Must be Integer.

submodel
optional

Filter based on a submodel name


Value:

Must be String

submodel_id
optional

Filter based on a submodel id


Value:

Must be Integer.

year
optional

Filter based on a year


Value:

Must be Integer.

serial_number
optional

Filter based on a year provided by a serial number


Value:

Must be Integer.

approved
optional

Value:

Must be true or false.

pending
optional

Value:

Must be true or false.


GET /instruments/:id
Show an instrument

Supported Formats

json

Errors

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

Params

Param name Description
shallow
optional

Pass true to include trait values, or false to include the IDs of values (faster).


Value:

Must be true or false.


POST /instruments
Create an instrument

Supported Formats

json

Errors

400

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be Integer.

model_id
optional

Value:

Must be Integer.

submodel_id
optional

Value:

Must be Integer.


PUT /instruments/:id
Update an instrument

Supported Formats

json

Errors

400

Params

Param name Description
name
optional

Value:

Must be String

brand_id
optional

Value:

Must be Integer.

model_id
optional

Value:

Must be Integer.

submodel_id
optional

Value:

Must be Integer.


DELETE /instrument/:id
Destroy an instrument

Supported Formats

json

Errors

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