API Documentation

Product Registration API

Description

This endpoint is used for product registration. The user needs to provide the required information in the body of the request to register a product.

Endpoint

Contact Wholescale for specific endpoints and API keys.

Request

Headers

Content-Type: application/json

Body Parameters


Parameter

Type

Required

Description

first_name

string

Yes

The first name of the user

last_name

string

Yes

The last name of the user

email

string

Yes

The email address of the user

phone

integer

Yes

The phone number of the user

product

string

Yes

The product identifier

platform

string

No

The platform through which the product is registered

client

integer

Yes

The client identified (reach out to Wholescale for Client ID)

fingerprint

string

Yes

A string containing additional encrypted data (fingerprint)

add_mailing

boolean

No

Indicates if the user wants to be added to the mailing list

custom_attributes

array

No

An array of custom attribute objects

Custom Attribute Object


Parameter

Description

field_name

The name of the custom field

field_value

The value associated with the custom field

Example Request Body


{
"first_name": "first",
"last_name": "last",
"email": "email@gmail.com",
"phone": 12345678,
"product": "123456789",
"platform": "Direct Link",
"client": 159,
"black_box": encodeURIComponent(window.blackBoxStr), "add_mailing": false,
"custom_attributes": [
{
"field_name": "order_number", "field_value": "123456"
}, {
"field_value": "Walmart" },
{
"field_name": "date_of_purchase",
"field_name": "retailer",
"field_value": "2024-06-04" }
]}
Mandatory Fields

first_name, last_name, email, phone, product, client, black_box

Custom Attributes

To pass any custom information, use the custom_attributes array. Each custom attribute should be an object with field_name and field_value as shown in the example request body.

Notes

For the client field, you will need the client ID. Please reach out to the Wholescale team to obtain this ID. Ensure that the request body adheres to the format and data types specified above.