Valuations

Valuations are a core part of the OCS platform. They allow users to get a valuation for their vehicle based on the information they provide. Not only that but a rules engine will allow you to reject certain vehicles and apply price modifications on the fly. This page will dive into the different valuation endpoints you can use to manage valuations programmatically.

The valuation model

Below are the properties that make up a valuation.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the valuation.

  • Name
    account_id
    Type
    string
    Description

    The account the valuation is attached to.

  • Name
    provider
    Type
    string
    Description

    The valuation provider being used e.g., CAP, AutoTrader and Glass.

  • Name
    type
    Type
    string
    Description

    Types are based on the settings on the account e.g., you may want to segment valuations into trade and retail categories based on rules.

  • Name
    vrm
    Type
    string
    Description

    The vehicle registration

  • Name
    mileage
    Type
    int
    Description

    The mileage of the vehicle.

  • Name
    provider_price
    Type
    int
    Description

    The price returned from the valuation provider.

  • Name
    price
    Type
    int
    Description

    The valuation price returned to the customer after rules have been applied.

  • Name
    make
    Type
    string
    Description

    The make of the vehicle.

  • Name
    model
    Type
    string
    Description

    The model of the vehicle.

  • Name
    variant
    Type
    string
    Description

    The variant of the vehicle.

  • Name
    date_registered
    Type
    timestamp
    Description

    The date the vehicle was registered.

  • Name
    body_type
    Type
    string
    Description

    The body type of the vehicle.

  • Name
    fuel_type
    Type
    string
    Description

    The fuel type of the vehicle.

  • Name
    condition
    Type
    string
    Description

    The condition of the vehicle.

  • Name
    transmission
    Type
    string
    Description

    The transmission of the vehicle.

  • Name
    colour
    Type
    string
    Description

    The colour of the vehicle.

  • Name
    previous_owners
    Type
    int
    Description

    The number of previous owners of the vehicle.

  • Name
    state
    Type
    string
    Description

    The state of the valuation based on it's lifecycle. e.g., Pending, Accepted, NEW, Rejected etc

  • Name
    extmeta
    Type
    json
    Description

    A raw JSON of the external meta that has been programmatically added to the valuation.

  • Name
    submitted_by
    Type
    string
    Description

    Who submitted the valuation. Defaults to Customer.

  • Name
    purchased
    Type
    boolean
    Description

    Whether the valuation has been purchased and promoted to stock.

  • Name
    notes
    Type
    ValuationNote[]
    Description

    Notes / log of the valuation.

    • Name
      name
      Type
      string
      Description

      Of who added the note.

    • Name
      value
      Type
      string
      Description

      The contents of the note

    • Name
      created_at
      Type
      timestamp
      Description

      When the note was created.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the valuation was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the valuation was last updated.


Update a valuation state

This mutation allows you to alter the state of a valuation. E.g., you can change the status of a valuation from Pending to Accepted.

These state's are managed in the valuations dashboard, so it's important that you only update the state of a valuation to a state that is valid for the valuation.

Required attributes

  • Name
    id
    Type
    string
    Description

    The unique identifier of the valuation.

  • Name
    state
    Type
    string
    Description

    The desired state of the valuation.

Request

POST
/
mutation UpdateValuationState($input: MutationUpdateValuationStateInput!) {
  updateValuationState(input: $input) {
    ... on FieldError {
      field
      message
      __typename
    }
    ... on MutationUpdateValuationStateSuccess {
      data {
        id
        state
        __typename
      }
      __typename
    }
    __typename
  }
}

Variables

{
  "input": {
    "id": "65bfe93809cd876531ab6118",
    "state": "Accepted"
  }
}

Response

{
  "id": "65bfe93809cd876531ab6118",
  "state": "Accepted"
}

Was this page helpful?