Skip to main content

Registrations

Creating a Registration

POST /tire-protection/registrations

To create a Registration, send a POST request to the /tire-protection/registrations endpoint with a JSON payload containing consumer, tire, and vehicle information.

tip

This endpoint only accepts JSON - set the HTTP header Content-Type: application/json on every POST request

Parameters

HTTP Headers

HeadersDescription
AuthorizationBearer token in form of a JWT see getting started for more information

HTTP Request Body

Send a Registration object as the request body as JSON.

Errors

This endpoint may respond with any documented of the status codes, however the most common errors are 401: Unauthorized and 400: Bad Request.

StatusNameDescriptionResolution
400Bad RequestThe server could not understand the requestCheck all parameters and ensure the request is valid
401UnauthorizedThe request is unauthenticatedEnsure your JWT is valid

Example

Registration object

{
"product_id": "YOUR-PRODUCT-ID",
"invoiceNumber": "001-20345",
"enrollDate": "2021-08-01T13:08:00.000Z",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"vehicle": {
"year": 2021,
"make": "Tesla",
"model": "Model 3"
},
"tires": [
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
}
]
}

Request

curl --location \
--request POST "https://sandbox.absintegrations.com/api/v3/tire-protection/registrations" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg" \
--header "Content-Type: application/json" \
--data-raw '{
"product_id": "YOUR-PRODUCT-ID",
"invoiceNumber": "001-20345",
"enrollDate": "2021-08-01T13:08:00.000Z",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"vehicle": {
"year": 2021,
"make": "Tesla",
"model": "Model 3"
},
"tires": [
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
}
]
}'

Response

{ "id": "6109bf5e5494a80b344f5daf" }

Get a Registration

GET /tire-protection/registrations/:id

This endpoint retrieves the Registration with the specified ID.

note

Replace :id with the ID of the Registration to retrieve.

Parameters

HTTP Headers

HeadersDescription
AuthorizationBearer token in form of a JWT see getting started for more information

URL Parameters

NameDescription
:idThe Registration ID

Errors

This endpoint may respond with any documented of the status codes, however the most common errors are 401: Unauthorized and 404: Not Found.

StatusNameDescriptionResolution
401UnauthorizedThe request is unauthenticatedEnsure your JWT is valid
404Not FoundThe resource was not foundEnsure the Registration ID is correct

Example

Request

curl --location \
--request GET "https://sandbox.absintegrations.com/api/v3/tire-protection/registrations/63e68996f4307525f7778e8e" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg" \

Response

{
"_id": "63e68996f4307525f7778e8e",
"invoiceNumber": "001-20345",
"program_id": "63e68996f4307525f7777c7e",
"enrollDate": "2023-02-10T18:14:45.959Z",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"vehicle": {
"year": 2021,
"make": "Tesla",
"model": "Model 3"
},
"tires": [
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
}
]
}

Listing all Registrations

GET /tire-protection/registrations

To list all Registrations, send a GET request to the /tire-protection/registrations endpoint. Returned results are paginated. The request can use optional query string parameters to retrieve different pages.

Parameters

HTTP Headers

HeadersDescription
AuthorizationBearer token in form of a JWT see getting started for more information

URL Query String

NameDefault ValueDescription
pageSize100Number of records per page
page1The page to retrieve.

Errors

This endpoint may respond with any documented of the status codes, however the most common errors are 401: Unauthorized and 400: Bad Request.

StatusNameDescriptionResolution
401UnauthorizedThe request is unauthenticatedEnsure your JWT is valid
400Bad RequestThe server could not understand the requestCheck all parameters and ensure the request is valid

Example

Request

curl --location \
--request GET "https://sandbox.absintegrations.com/api/v3/tire-protection/registrations?page=1&pageSize=100" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg"

Response

{
"results": [
{
"_id": "6109bf5e5494a80b344f5daf",
"product_id": "YOUR-PRODUCT-ID",
"invoiceNumber": "001-20345",
"enrollDate": "2021-08-01T13:08:00.000Z",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"vehicle": {
"year": 2021,
"make": "Tesla",
"model": "Model 3"
},
"tires": [
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
},
{
"make": "BRIDGESTONE",
"model": "TURANZA ER33",
"size": "235/45R18",
"retailPrice": 334.31
}
],
"cancelledOn": "2021-08-03T10:10:00.000Z"
}
],
"totalRecordCount": 1,
"page": 1,
"pageSize": 100,
"totalPages": 1
}

Cancelling a Registration

PATCH /tire-protection/registrations/:id
PATCH /tire-protection/registrations?invoiceNumber=:invoiceNumber

To cancel a Registration, send a PATCH request to the /tire-protection/registrations/:id endpoint or to the /tire-protection/registrations?invoiceNumber=:invoiceNumber endpoint with a JSON payload containing the cancellation date.

info

Not all Registrations can be cancelled. If the terms and conditions for your program do not allow for cancellation, or if a registration has already been cancelled, attempting to cancel a Registration will result in the error 409: Conflict

warning

If your invoice numbers are not unique, you must use the /tire-protection/registrations/:id endpoint

tip

This endpoint only accepts JSON - set the HTTP header Content-Type: application/json on every PATCH request

Parameters

HTTP Headers

HeadersDescription
AuthorizationBearer token in form of a JWT see getting started for more information

HTTP Request Body

NameTypeRequired
cancelledOnISO 8601 Date extended format stringYes

URL Parameters

NameDescriptionRequired
:idThe Registration IDRequired if not using invoiceNumber

URL Query String

NameDescriptionRequired
invoiceNumberThe invoice numberRequired if not using :id

Errors

This endpoint may respond with any documented of the status codes, however the most common errors are 401: Unauthorized and 409: Conflict.

StatusNameDescriptionResolution
401UnauthorizedThe request is unauthenticatedEnsure your JWT is valid
409ConflictThe request conflicts with the current state of the serverEnsure the Registration ID or Invoice Number is correct. Some Registrations cannot be cancelled. Registrations cannot be cancelled more than once.

Example

Registration object

{
"cancelledOn": "2021-08-03T10:10:00.000Z"
}

Request

curl --location \
--request PATCH "https://sandbox.absintegrations.com/api/v3/tire-protection/registrations?invoiceNumber=001-20345" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg" \
--header "Content-Type: application/json" \
--data-raw '{
"cancelledOn": "2021-08-03T10:10:00.000Z"
}'

Response

No body is returned in the response, only the HTTP status: 204: No Content