Skip to main content

Registrations

Creating a Registration

POST /motor-club/registrations

To create a Registration, send a POST request to the /motor-club/registrations endpoint with a JSON payload containing consumer 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": "2024-09-15T13:08:00.000Z",
"customer": {
"name": "John Doe",
"phone": "+13034579876",
"email": "john.doe@example.com",
"address": {
"line1": "10170 Church Ranch Way",
"line2": "Suite 320",
"city": "Westminster",
"state": "CO",
"zip": "80021",
"country": "US"
}
}
}

Request

curl --location \
--request POST "https://sandbox.absintegrations.com/api/v3/motor-club/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": "2024-09-15T13:08:00.000Z",
"customer": {
"name": "John Doe",
"phone": "+13034579876",
"email": "john.doe@example.com",
"address": {
"line1": "10170 Church Ranch Way",
"line2": "Suite 320",
"city": "Westminster",
"state": "CO",
"zip": "80021",
"country": "US",
}
}
}'

Response

{ "id": "66eb39bfc50bbc2c33fb3a50" }

Get a Registration

GET /motor-club/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/motor-club/registrations/66eb39bfc50bbc2c33fb3a50" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg" \

Response

{
"_id": "66eb39bfc50bbc2c33fb3a50",
"invoiceNumber": "001-20345",
"enrollDate": "2024-09-15T13:08:00.000Z",
"customer": {
"name": "John Doe",
"phone": "+13034579876",
"email": "john.doe@example.com",
"address": {
"line1": "10170 Church Ranch Way",
"line2": "Suite 320",
"city": "Westminster",
"state": "CO",
"zip": "80021",
"country": "US"
}
}
}

Listing all Registrations

GET /motor-club/registrations

To list all Registrations, send a GET request to the /motor-club/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/motor-club/registrations?page=1&pageSize=100" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg"

Response

{
"results": [
{
"_id": "66eb39bfc50bbc2c33fb3a50",
"invoiceNumber": "001-20345",
"enrollDate": "2024-09-15T13:08:00.000Z",
"customer": {
"name": "John Doe",
"phone": "+13034579876",
"email": "john.doe@example.com",
"address": {
"line1": "10170 Church Ranch Way",
"line2": "Suite 320",
"city": "Westminster",
"state": "CO",
"zip": "80021",
"country": "US"
}
}
}
],
"totalRecordCount": 1,
"page": 1,
"pageSize": 100,
"totalPages": 1
}

Updating a Registration

PATCH /motor-club/registrations/:id
PATCH /motor-club/registrations?invoiceNumber=:invoiceNumber

To update customer information on a Registration, send a PATCH request to the /motor-club/registrations/:id endpoint or to the /motor-club/registrations?invoiceNumber=:invoiceNumber endpoint with a JSON payload containing the updated consumer object.

warning

If your invoice numbers are not unique, you must use the /motor-club/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
customerA customer objectYes

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

{
"customer": {
"name": "Jane Smith",
"phone": "+18882684888",
"email": "jane.smith@example.com",
"address": {
"line1": "300 N Beach St",
"line2": "",
"city": "Daytona Beach",
"state": "FL",
"zip": "32114",
"country": "US"
}
}
}

Request

curl --location \
--request PATCH "https://sandbox.absintegrations.com/api/v3/motor-club/registrations?invoiceNumber=001-20345" \
--header "Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjc2NTU5NzAsImV4cCI6MTYyNzY2MzE3MCwiYXVkIjoiaHR0cHM6Ly9zYW5kYm94LmFic2ludGVncmF0aW9ucy5jb20vYXBpL3YzIiwiaXNzIjoiNjEwMmI1MjFmNDAzZjQyZGRjZGU3YWU1In0.y5-vxJHlBtVf2Jr9sPO4I97L5hImkhyn1EtHeCoeIzqZwObpcVy9ZEMJoCGbXwnGdeZ6GpaiO8KD9xLqgUZcTg" \
--header "Content-Type: application/json" \
--data-raw '{
"customer": {
"name": "Jane Smith",
"phone": "+18882684888",
"email": "jane.smith@example.com",
"address": {
"line1": "300 N Beach St",
"line2": "",
"city": "Daytona Beach",
"state": "FL",
"zip": "32114",
"country": "US"
}
}
}'

Response

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

Cancelling a Registration

PATCH /motor-club/registrations/:id
PATCH /motor-club/registrations?invoiceNumber=:invoiceNumber

To cancel a Registration, send a PATCH request to the /motor-club/registrations/:id endpoint or to the /motor-club/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 /motor-club/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": "2024-09-17T10:10:00.000Z"
}

Request

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

Response

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