Skip to content

Machines

Get Machine

GET v1/machines/{machine-id} HTTP/2

Parameters

Name Type Required Default Description
machine-id route The id of the machine to return.

Response

Machine Model

Get Machine Variation

GET v1/machines/variations/{variation-id} HTTP/2

Parameters

Name Type Required Default Description
variation-id route The id of the machine variation to return.

Response

Machine Variation Model

Get Machine Revision

GET v1/machines/revisions/{revision-id} HTTP/2

Parameters

Name Type Required Default Description
revision-id route The id of the machine revision to return.

Response

Machine Revision Model

Search Machines

POST v1/machines/search HTTP/2
Content-Type: application/json

{
  ... Machine search request
}

Parameters

Name Type Required Default Description
page query The page number to return - starts at 1.
pageSize query The page size.

Request

Machine Search Criteria Model

Response

Machine Search Results Model

Get Stats for Machines

POST v1/machines/stats HTTP/2
Content-Type: application/json

{
  ... Machine stats request
}

Request

Machine Stats Criteria Model

Response

Machine Stats Results Model

Closest Competitors

The closest-competitors endpoint can be used to find the closest equipment to a variation given a set of search criteria.

POST v1/machines/variations/{variation-id}/closest-competitors HTTP/2
Content-Type: application/json

{
  "attributeId": << attribute to find closest competitors by >>,
  "criteria": << machine search criteria >>,
  "options": {
    "level": << level of data to return >>,
    "includeMedia": << include media? >>,
    "mediaTypes": << media types to include >>,
    "attributeTags": << attribute tags to include >>,
    "includeSubject": << include the subject variation >>,
    "includeVariationIds": << arry of variation ids to include >>
  }
}

Parameters

Name Type Required Default Description
page query The page number to return - starts at 1.
pageSize query The page size.

Request

Schema
{
  "attributeId": 0,
  "criteria": { << machine search criteria >> },
  "options": {
    "level": "string",
    "includeMedia": false,
    "mediaTypes": [ "string" ],
    "attributeTags": [ "string" ],
    "includeSubject": true,
    "includeVariationIds": [ 0 ]
  }
}
  • attributeId - The attribute to find closest competitors by. Competitive equipment will be found based on the value of this attribute. On the first page the value of the subject variation should be on the center of the page, unless at the highest/lowest values of the attribute.

  • criteria - The criteria to restrict equiment by - Machine Search Criteria Model

  • options - Options to control the data returned

  • level - The level of data to be returned machines/variations/revisions/attributes. As the levels imply each level adds more depth to the search results - this comes at the cost of slower query times and larger responses.

  • includeMedia - Should media be included in the output? False by default. This is only effective if the level is set to revisions.

  • mediaTypes - Where includeMedia is true this can be used in a similar way as attributeTags to restrict the media that is returned. For example; searching with "mediaTypes": ["hero-shot"] will return only the hero shot images on equipment.

  • attributeTags - Where the level is set to attributes this can be used to reduce the attributes returned to only those with specific tags. For example most ranges will have 2-3 attributes tagged as highlight for use in search results; searching with "attributeTags": ["highlight"] will return only the values for these 2-3 attributes.

  • includeSubject - Should the variation that competitors are being found for be included in the results or not? This will force the subject to be included even if it should be excluded by the criteria, true by default. If set to false the subject will still be returned if it's contained within the criteria.

  • includeVariationIds - An array of additional variation ids to include in the results. As with the includeSubject these variations will be added even if the criteria would not cover them, these variations will appear in their correct place sort wise, so may not be on the first page of result.

Response

Paged varation search results