Example JSON Representation

{
  "id": 16,
  "trait_values": {
     "head_inlay": {
       value: "PRS Bird"
     },
     "fingerboard_material": {
       "value": "Ebony",
       "description": "Diospyros ebenum",
       "metadata": {
         "Source": "Africa"
       }
     }
  },
  "history": [
    {
      "changes": {
        "head_inlay": {
          "old": "Gretsch Horseshoe",
          "new": "PRS Bird"
        }
      },
      "created_at": "2016-12-07T08:03:57.732Z",
      "description": ""
    }
  ],
  "brand": {
    "id": 2,
    "name": "Fender",
    "approved": true,
    "type": "guitar"
  },
  "model": {
    "id": 239,
    "name": "Stratocaster",
    "approved": true,
    "brand_id": 2
  }
}

Supported Formats

json

GET /items
List GitFax items or retrieve items matching a serial number / RFID.

Returns GitFax items matching the criteria you provide. To search the records for a particlar serial number, pass ?serial_number=X. Note that there may be multiple matches for any given serial number, and you can paginate through results by passing the ?page= option.

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.gitfax.com/items?serial_number=AAA1A34"

{
  "pagination": {
    "per_page": 25,
    "total_pages": 1,
    "total_objects": 1
  },
  "items": [
    {
      "id": 16,
      "trait_values": {
        "head_inlay": {
          value: "PRS Bird"
        },
        "fingerboard_material": {
          "value": "Ebony",
          "description": "Diospyros ebenum",
          "metadata": {
            "Source": "Africa"
          }
        }
      },
      "history": [
        {
          "changes": {
            "head_inlay": {
              "old": "Gretsch Horseshoe",
              "new": "PRS Bird"
            }
          },
          "created_at": "2016-12-07T08:03:57.732Z",
          "description": ""
        }
      ],
       "brand": {
         "id": 2,
         "name": "Fender",
         "approved": true,
         "type": "guitar"
       },
       "model": {
         "id": 239,
         "name": "Stratocaster",
         "approved": true,
         "brand_id": 2
       }
    }
  ]
}
      

Params

Param name Description
page
optional

Value:

Must be Integer.

per_page
optional

Value:

Must be Integer.

serial_number
optional

Value:

Must be String

rfid_value
optional

Value:

Must be String


GET /items/:id
Show a GitFax item

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.gitfax.com/items/24"

{
  "gitfax_item": {
    "id": 16,
    "trait_values": {
      "head_inlay": {
        value: "PRS Bird"
      },
      "fingerboard_material": {
        "value": "Ebony",
        "description": "Diospyros ebenum",
        "metadata": {
          "Source": "Africa"
        }
      }
    },
    "history": [
      {
        "changes": {
          "head_inlay": {
            "old": "Gretsch Horseshoe",
            "new": "PRS Bird"
          }
        },
        "created_at": "2016-12-07T08:03:57.732Z",
        "description": ""
      }
    ],
    "brand": {
      "id": 2,
      "name": "Fender",
      "approved": true,
      "type": "guitar"
    },
    "model": {
      "id": 239,
      "name": "Stratocaster",
      "approved": true,
      "brand_id": 2
    }
  }
}
      

POST /items
Create a GitFax item

Create the GitFax item by passing AxeFax brand, model and submodel IDs, serial number and/or RFID value, and any specific traits identified on this particular instrument. Note that a serial number or RIFD value is required, and cannot be changed once the record is created.

Supported Formats

json

Errors

400

Examples

curl -X POST -d '{"brand_id": 2, "model_id": 239, "serial_number": "AAA1A34", "head_inlay":926}' -H "Content-type: application/json" -H "Authorization: XXXXX" "https://api.gitfax.com/items"

// Returns the newly created record
      

Params

Param name Description
name
optional

Value:

Must be String

customer_id
optional

When using the Appraisals API, provide the customer ID which owns the GitFax instrument


Value:

Must be Integer.

brand_id
required

The brand ID of the instrument. You may also provide a brand name by passing `brand` instead.


Value:

Must be Integer.

brand
required

The brand name of the instrument. You may also provide a brand ID by passing `brand_id` instead.


Value:

Must be String

model_id
optional

The model ID of the instrument within it's brand.


Value:

Must be Integer.

model
optional

The model name of the instrument within it's brand.


Value:

Must be String

submodel_id
optional

The submodel ID of the instrument within it's brand.


Value:

Must be Integer.

submodel
optional

The submodel name of the instrument within it's brand.


Value:

Must be String

year
optional

The year of manufacture.


Value:

Must be Integer.

serial_number
required

The serial number of the instrument that uniquely idenfities it. You may pass `rfid_value` instead if you are not using serial numbers.


Value:

Must be String

rfid_value
required

The RFID tag value of the instrument that uniquely idenfities it. You may pass `serial_number` instead if you are not using RFIDs.


Value:

Must be String


PUT /items/:id
Update a GitFax item

Modify the GitFax item by passing new trait value IDs for trait values. Changes you make are permanently logged to the item's history and update its modification date. An item's serial number and/or RFID value cannot be changed after it is created.

Supported Formats

json

Errors

400

Examples

curl -X PUT -d '{"head_inlay":926}' -H "Content-type: application/json" -H "Authorization: XXXXX" "https://api.gitfax.com/items/24"

// Returns the same response as GET /items/:id
      

Params

Param name Description
name
optional

Value:

Must be String

customer_id
optional

When using the Appraisals API, provide the customer ID which owns the GitFax instrument


Value:

Must be Integer.

brand_id
required

The brand ID of the instrument. You may also provide a brand name by passing `brand` instead.


Value:

Must be Integer.

brand
required

The brand name of the instrument. You may also provide a brand ID by passing `brand_id` instead.


Value:

Must be String

model_id
optional

The model ID of the instrument within it's brand.


Value:

Must be Integer.

model
optional

The model name of the instrument within it's brand.


Value:

Must be String

submodel_id
optional

The submodel ID of the instrument within it's brand.


Value:

Must be Integer.

submodel
optional

The submodel name of the instrument within it's brand.


Value:

Must be String

year
optional

The year of manufacture.


Value:

Must be Integer.

serial_number
required

The serial number of the instrument that uniquely idenfities it. You may pass `rfid_value` instead if you are not using serial numbers.


Value:

Must be String

rfid_value
required

The RFID tag value of the instrument that uniquely idenfities it. You may pass `serial_number` instead if you are not using RFIDs.


Value:

Must be String


DELETE /items/:id
Destroy a GitFax item

Note: You must be a GitFax administrator to use this API. Because GitFax stores permanent records of instrument manufacture and maintenance, deleting records is not common.

Supported Formats

json

Errors

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

Examples

curl -X DELETE -H "Authorization: XXXXX" "https://api.gitfax.com/items/24"

// Returns status code 204