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.
This endpoint only accepts JSON - set the HTTP header Content-Type: application/json
on every POST
request
Parameters
HTTP Headers
Headers | Description |
---|---|
Authorization | Bearer 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
.
Status | Name | Description | Resolution |
---|---|---|---|
400 | Bad Request | The server could not understand the request | Check all parameters and ensure the request is valid |
401 | Unauthorized | The request is unauthenticated | Ensure 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.
Replace :id
with the ID of the Registration to retrieve.
Parameters
HTTP Headers
Headers | Description |
---|---|
Authorization | Bearer token in form of a JWT see getting started for more information |
URL Parameters
Name | Description |
---|---|
:id | The 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
.
Status | Name | Description | Resolution |
---|---|---|---|
401 | Unauthorized | The request is unauthenticated | Ensure your JWT is valid |
404 | Not Found | The resource was not found | Ensure 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
Headers | Description |
---|---|
Authorization | Bearer token in form of a JWT see getting started for more information |
URL Query String
Name | Default Value | Description |
---|---|---|
pageSize | 100 | Number of records per page |
page | 1 | The 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
.
Status | Name | Description | Resolution |
---|---|---|---|
401 | Unauthorized | The request is unauthenticated | Ensure your JWT is valid |
400 | Bad Request | The server could not understand the request | Check 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"