Session Payload

Understanding the Session Payload

This section outlines the structure of the session payload that will be sent as a request body to the APIs developed by our buy-back partners, including the Max Price or Pricing API. As partners responsible for offering competitive pricing and assessing device conditions, it's crucial to understand the data you'll receive for accurate and efficient processing.

Payload Structure

The session payload encapsulates all necessary information about a trade-in device, organized into three key sections:

  • Device Assessments: Contains detailed grading assessments, providing insights into the device's physical condition and overall functionality. This section is pivotal for accurately appraising the device's value.
  • Device Identification: Includes essential identification details such as make, model, IMEI and more. This information ensures accurate and specific device evaluation.
  • Transaction Information: Presents transaction-related details, such as customer details, applicable in certain session states.
  • Session Metadata: Anything that doesn't fit into the above categories, such as the session state, the session ID, photos of the device and more.

We use JSON when sending the payload to your APIs, ensuring a consistent and structured format for easy parsing and processing. Here's the structure:

{
  "identification": { ... },
  "assessments": [ ... ],
  "metadata": { ... },
  "transaction": { ... }
}

Session State Variability

The comprehensiveness of the session payload can vary depending on the session's current state:

Creation

Empty at the beginning (only useful for internal use). You can utilise hooks here if you want to block / get notified about the session creation.

Identification

Focused on device identification. As an example you might get this:

{
  "identification": {
    "brand": "Apple",
    "model": "iPhone 12 Pro Max",
    "modelName": "A2410",
    "manufacturer": "Apple Inc",
    "color": "Silver",
    "capacity": "256GB",
    "description": "Apple iPhone 12 Pro Max 256GB Silver",
    "identifier": "3567231196XXXX"
  }
}

Post-Assessment

Expanded to include grading results and some metadata. So that would be:

{
  "identification": { ... },
  "assessments": [
    {
      "component": "Microphone",
      "condition": "Working"
    },
    {
      "component": "Multitouch",
      "condition": "Working"
    },
    {
      "component": "Digitizer",
      "condition": "Working"
    },
    {
      "component": "Speaker",
      "condition": "Faulty"
    },
    {
      "component": "Unlock Sensor",
      "condition": "Working"
    },
    {
      "component": "Front Camera",
      "condition": "Working"
    },
    {
      "component": "Back Camera",
      "condition": "Faulty"
    },
    {
      "component": "Gyroscope",
      "condition": "Working"
    },
    {
      "component": "Front Side",
      "condition": "B"
    },
    {
      "component": "Back Side",
      "condition": "A"
    },
    {
      "component": "Body Frame",
      "condition": "C"
    },
    {
      "component": "Back Cameras",
      "condition": "D"
    },
    {
      "component": "Display",
      "condition": "A"
    },
    {
      "component": "Battery Class",
      "condition": "B"
    }
  ],
  "metadata": {
    "assessmentPhotos": ["https://....png","https://....png","https://....png"],
    "pandasSessionId": "1615f097-73ce-49aa-a987-ddf88f22ca7d",
    "locationId": "4565fb56-848b-4dae-b3c5-52cdf31296ce",
    "locationName": "Acme Co Store 34"
  },
}

Transaction

All-encompassing, including customer and transaction details. So same as before but with an added transaction key:

{
  "identification": { ... },
  "assessments": [ ... ],
  "metadata": { ... },
  "transaction": {
    "fullName": "John Doe",
    "email": "[email protected]",
    "phoneNumber": "+4412345690631",
  }
}

Detailed Field Documentation

identification keys

KeyTypeSample ValueDescription
brandstring"Apple"The brand of the device.
modelstring"iPhone 12 Pro Max"The model of the device.
modelNamestring"A2410"The model name of the device, including the regulatory number.
manufacturerstring"Apple Inc"The manufacturer of the device.
capacitystring"128GB"The capacity of the device, available on iOS and selected Android devices.
descriptionstring"Apple iPhone 12 Pro Max 256GB Silver"A full description of the device.
identifierstring"356723119677240"The IMEI for smartphones, or S/N for smartwatches.
secondaryIdentifierstring"356723119677241"(Optional) Some devices have a secondary IMEI.
colorstring"Silver"(Optional) The color of the device.

assessments structure

N items of the following structure:

{
  "component": "Microphone",
  "condition": "Working"
}

In the following table we're describing the different components we support and the possible conditions:

ComponentPossible ValuesProductDescription
DigitizerWorking, FaultyWebappThe test verifies that all areas of the screen can detect touch.
SpeakerWorking, FaultyWebappThe test verifies whether the speaker is functioning or not.
MicrophoneWorking, FaultyWebappThe test verifies whether the microphone is functioning or not.
Unlock SensorWorking, FaultyWebappThe test assesses the functionality of Touch ID and Face ID, whether it's working or not.
Front CameraWorking, FaultyWebappThe test examines the front camera’s capability to focus on a face.
Back CameraWorking, FaultyWebappThe test assesses back cameras’ capability to focus on objects.
GyroscopeWorking, FaultyWebappThe test assesses the functionality of the gyroscope, whether it's working or not.
MultitouchWorking, FaultyWebappThe test assesses the functionality of multitouch, determining whether it's working properly or not.
Front SideA, B, C, DFlexThis test evaluates the cosmetic condition of the device's front side, checking for cracks or scratches.
Back SideA, B, C, DFlexThis test evaluates the cosmetic condition of the device's back side, checking for cracks or scratches.
Body FrameA, B, C, DFlexThis test evaluates the cosmetic condition of the device's body frame, checking for cracks or scratches.
Back CamerasA, B, C, DFlexThis test evaluates the cosmetic condition of the device's back cameras, checking for cracks or scratches.
DisplayA, CFlexThis test examines the device's Display for any blemishes, which are minor or superficial imperfections.
Battery ClassA, B, CSystemThis test is assessed algorithmically, where A: ≥ 94%, B: 93%-86%, and C: ≤ 85% battery percentage.

metadata keys

KeyTypeSample ValueDescription
assessmentPhotosArray<string>[ 'URL_1', 'URL_2' ]An array of strings representing links to images of the device photos.
pandasSessionIdstringUUIDThe internal session id (it’s used on our end but might be useful to external integrators as well)
locationIdstringUUID(Available on physical transactions): The internal location ID in which this session took place
locationNamestringAcme Co Store 34(Available on physical transactions): The location name

transaction keys

KeyTypeSample ValueDescription
fullNamestringJohn DoeThe full name of the customer.
emailstring[email protected]The email of the customer.
phoneNumberstring+3053908XXXXXThe phone number of the customer with the country code.