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.
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": "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.
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/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
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/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.
If your invoice numbers are not unique, you must use the /motor-club/registrations/:id
endpoint
This endpoint only accepts JSON - set the HTTP header Content-Type: application/json
on every PATCH
request
Parameters
HTTP Headers
Headers | Description |
---|---|
Authorization | Bearer token in form of a JWT see getting started for more information |
HTTP Request Body
Name | Type | Required |
---|---|---|
customer | A customer object | Yes |
URL Parameters
Name | Description | Required |
---|---|---|
:id | The Registration ID | Required if not using invoiceNumber |
URL Query String
Name | Description | Required |
---|---|---|
invoiceNumber | The invoice number | Required 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
.
Status | Name | Description | Resolution |
---|---|---|---|
401 | Unauthorized | The request is unauthenticated | Ensure your JWT is valid |
409 | Conflict | The request conflicts with the current state of the server | Ensure 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.
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
If your invoice numbers are not unique, you must use the /motor-club/registrations/:id
endpoint
This endpoint only accepts JSON - set the HTTP header Content-Type: application/json
on every PATCH
request
Parameters
HTTP Headers
Headers | Description |
---|---|
Authorization | Bearer token in form of a JWT see getting started for more information |
HTTP Request Body
Name | Type | Required |
---|---|---|
cancelledOn | ISO 8601 Date extended format string | Yes |
URL Parameters
Name | Description | Required |
---|---|---|
:id | The Registration ID | Required if not using invoiceNumber |
URL Query String
Name | Description | Required |
---|---|---|
invoiceNumber | The invoice number | Required 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
.
Status | Name | Description | Resolution |
---|---|---|---|
401 | Unauthorized | The request is unauthenticated | Ensure your JWT is valid |
409 | Conflict | The request conflicts with the current state of the server | Ensure 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