Recapture API

The Recapture API allows you to upload, view and delete Customers.

Uploading Customer lists

The main purpose of the Recapture API is to facilitate the automated upload of new Customers.

Customer lists are often very long, so the Recapture API allows you to queue Customer uploads without immediately processing every Customer in the list. There is an endpoint to queue the upload, and separate endpoints to check the status of the upload, and cancel it, if necessary.

Upload a list of Customers

A POST request to https://api.autograb.com.au/v2/recapture/upload?region={REGION} will initiate a new queued Customer list upload.

The request body has the following parameters:

  • name: A name to assign to the upload, for personal reference

  • enable_rego_lookups: When rego lookups are enabled, if the registration plate (and state, if in Australia) is provided, but no VIN is provided for a Customer, we will perform a VIN lookup (at additional cost to you) and save the VIN along with the Customer. When a Customer includes a VIN number, we can cross-reference the VIN with new vehicle listings posted in the future, and use this to verify that the car being sold is definitely the same car that you are tracking.

  • monitor_start_date: An optional default date from which Customers in this upload should start being monitored. Applied to any Customer that does not specify its own monitor_start_date.

  • monitor_end_date: An optional default date after which Customers in this upload should stop being monitored. Applied to any Customer that does not specify its own monitor_end_date.

  • customers: An array of the Customers that you want to upload. Customers can have any of the following properties, but everything is optional (however, at least a rego OR a vin is necessary for tracking purposes):

    • rego: The registration plate of the Customer's vehicle

    • state: The registration state of the vehicle, if applicable

    • vin: The Vehicle Identification Number corresponding to the Customer's vehicle

    • external_id: An optional identifier from your own system to associate with this Customer, for your reference.

    • sale_date: The date that the vehicle was sold to the Customer, if applicable. For reference only.

    • monitor_start_date: If provided, overrides the upload-level monitor_start_date for this specific Customer.

    • monitor_end_date: If provided, overrides the upload-level monitor_end_date for this specific Customer.

    • additional_fields: A map of any other properties that should be saved along with the Customer.

If you try to upload an empty list, you will receive a You must upload at least one customer error.

Example

To perform an example request:

This endpoint returns a 202 Accepted response. An example response payload is:

Check upload status

Once you've queued a Customer upload, you may want to check on the upload progress. Sending a GET request to /v2/recapture/upload/{UPLOAD_ID}?region={REGION} will return information about the upload, including the progress and the number of errors.

The key properties to check the upload progress are total_uploaded_customers and total_processed_customers. Creating a new Customer consists of two steps - uploading and processing - and these two counters reflect the progress made for each of these steps.

Once total_processed_customers is equal to total_uploaded_customers, the upload is complete. If there are any unexpected errors during the upload, total_errors will increase to signify this, but total_processed_customers is inclusive of errors.

Example

To perform an example request:

An example response payload is:

Cancel an upload

If you queue a Customer upload and later change your mind, you can cancel the upload, stopping the creation of any more Customers.

The response payload will include the details of the deleted upload.

Example

To perform an example request:

An example response payload is:

Managing Customers

Once you have uploaded a Customer list, you are able to use the Recapture API to view your newly uploaded Customers, as well as create, edit and delete individual Customer.

Get a list of all Customers

You can use the /v2/recapture/customers?region={REGION} endpoint to retrieve a list of all your Customers.

This list is paginated, and you can move between pages using the offset and limit query parameters. The limit is capped at 500.

If you want to get Customers associated with a specific upload, you can pass the unique Upload ID to the upload_id query parameter.

The response includes a total field with the overall count of Customers matching the query, which is useful for paginating through large lists.

Example

To perform an example request:

An example response payload is:

Create an individual Customer

You can create a single Customer directly using the PUT method on the /v2/recapture/customers?region={REGION} endpoint.

The request body has two parameters:

  • enable_rego_lookups: When enabled, if a registration plate is provided but no VIN, we will perform a VIN lookup (at additional cost). Defaults to false.

  • customer: An object with the Customer's details. At least a rego or a vin must be provided.

    • rego: The registration plate of the Customer's vehicle

    • state: The registration state of the vehicle, if applicable

    • vin: The Vehicle Identification Number corresponding to the Customer's vehicle

    • external_id: An optional identifier from your own system to associate with this Customer, for your reference

    • sale_date: The date that the vehicle was sold to the Customer, if applicable

    • monitor_start_date: If provided, the date from which this Customer should start being monitored

    • monitor_end_date: If provided, the date after which this Customer should stop being monitored

    • additional_fields: A map of any other properties to save with the Customer

If neither rego nor vin is provided, you will receive a Missing required properties error.

Example

To perform an example request:

An example response payload is:

Get an individual Customer

You can get individual Customer details using the GET method on /v2/recapture/customers/{CUSTOMER_ID}?region={REGION}.

Trying to lookup an invalid Customer ID returns the Invalid Customer ID error, and trying to look up a Customer that you don't have access to returns a You don't have permission to access that customer error.

Example

To perform an example request:

An example response payload is:

Update an individual Customer

If you need to make changes to an individual Customer's details, you can use the PATCH method on the /v2/recapture/customers/{CUSTOMER_ID}?region={REGION} endpoint.

Only the fields that you specify in the request body will be affected, and providing an empty value ("") or null will clear the field where applicable.

The response payload will include the updated Customer object.

You can update any of the following Customer properties: external_id, sale_date, monitor_start_date, monitor_end_date, additional_fields

sale_date, monitor_start_date, and monitor_end_date must be valid date strings if provided.

Example

To perform an example request:

An example response payload is:

Delete an individual Customer

You can delete an individual Customer by using the DELETE method on the /v2/recapture/customers/{CUSTOMER_ID}?region={REGION} endpoint.

The response payload includes the details of the Customer that was deleted.

The same error messages apply as with the Get Customer endpoint.

Example

To perform an example request:

An example response payload is:

Last updated

Was this helpful?