Public APIs for Registration form (RF)

B2B/Wholesale Registration Form Public API for Shopify Stores

These APIs are REST APIs. You can use them to manage customer pricing rules, calculate variants' prices based on rules, search for customers, get products, etc. Detailed instructions on how to do it are shown below:

How to get the access key

After you install the B2B/Wholesale Solution Shopify app. Go to the Public API page, and click on the Copy button.

Form endpoints

Get a form by ID

This endpoint helps you get form data only. Validation logic that works on the storefront will not be transferred along.

GET https://b2b-solution-public-api.bsscommerce.com/api/v1/rf/form/:id

Headers

Name
Value

Content-Type

application/json

x-bss-b2b-api-key

Your access key

Params

Name
Value

domain

Your store domain (i.e. abc.myshopify.com)

Response

"success": true,
    "data": {
        "formId": 1,
        "formFields": [
            {
                "id": "header-field-aa4914b46678e",
                "label": "Primary details",
                "type": "header",
                "required": false,
                "field": "custom",
                "heading_type": "h4",
                "width": "100%"
            },
            {
                "id": "first_name",
                "label": "First name",
                "type": "text",
                "required": true,
                "help_text": "",
                "placeholder": "",
                "default_value": "",
                "max_character": "",
                "width": "100%"
            },
            {
                "id": "last_name",
                "label": "Last name",
                "type": "text",
                "required": false,
                "help_text": "",
                "placeholder": "",
                "default_value": "",
                "max_character": "",
                "width": "100%"
            }
        ]
    }
}

Wholesaler endpoints

Create wholesaler

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rf/wholesaler/register

Headers

Name
Value

Content-Type

application/json

x-bss-b2b-api-key

Your access key

Params

Name
Value

domain

Your store domain (i.e. abc.myshopify.com)

Body

  • name is the field ID

  • value is customer infomation that was filled in

{
    "formId": 1,
    "formData": [
        {
            "name": "first_name",
            "value": "TEST"
        },
        {
            "name": "last_name",
            "value": "BSS"
        },
        {
            "name": "email",
            "value": "[email protected]"
        },
        {
            "name": "password",
            "value": "testbss"
        }
    ]
}

Response

{
    "success": true,
    "message": "Created wholesaler successfully",
    "wholesalerId": 3
}

Get customer/wholesaler data

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rf/wholesaler/filter

Headers

Name
Value

Content-Type

application/json

Request body params

Name
Value
Required

domain

Your store domain (i.e. abc.myshopify.com)

Required

accessKey

Your access key

Required

status

Status of customers that you want to get (i.e. pending/approved/rejected

Required

start_date

Format: yyyy-mm-dd

end_date

Format: yyyy-mm-dd

Example

{
  "domain": "abc.myshopify.com", 
  "accessKey": "xxx",
  "status": "pending",
  "start_date": "2025-03-01",
  "end_date": "2025-03-15"
}

Response

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "id": 34408,
            "form_id": 1,
            "status": "PENDING",
            "fields": [
                {
                    "name": "First name",
                    "value": "TEST"
                },
                {
                    "name": "Last name",
                    "value": "CUSTOMER"
                },
                {
                    "name": "Email",
                    "value": "[email protected]"
                },
                {
                    "name": "Company",
                    "value": "BSS Commerce"
                },
                {
                    "name": "Phone",
                    "value": "+84123456789"
                },
                {
                    "name": "Address",
                    "value": "123 Main St"
                },
                {
                    "name": "City",
                    "value": "Hanoi"
                },
                {
                    "name": "Country",
                    "value": "VN"
                },
                {
                    "name": "State",
                    "value": ""
                },
                {
                    "name": "Zip code",
                    "value": "123456"
                },
                {
                    "name": "Apartment/suite/etc.",
                    "value": "Apartment 123"
                },
                {
                    "name": "Subscribe to our newsletter",
                    "value": "yes"
                },
                {
                    "name": "EU VAT Validation",
                    "value": "AT1234567"
                },
                {
                    "name": "Dropdown selection(s)",
                    "value": "option-1"
                },
                {
                    "name": "UK Validation",
                    "value": "AT1234567"
                },
                {
                    "name": "US EIN Validation",
                    "value": "AT1234567"
                },
                {
                    "name": "ABN Validation",
                    "value": "AT1234567"
                },
                {
                    "name": "India GST Validation",
                    "value": "AT1234567"
                },
                {
                    "name": "Multiple checkbox",
                    "value": "option-1,option-2"
                },
                {
                    "name": "Radio options",
                    "value": "option-1"
                },
                {
                    "name": "Text field",
                    "value": "Test Content"
                },
                {
                    "name": "Text area",
                    "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper, diam et bibendum congue"
                },
                {
                    "name": "Number",
                    "value": "1234567890"
                },
                {
                    "name": "Date field",
                    "value": "1/1/2025"
                },
                {
                    "name": "File upload",
                    "value": "https://cdn.shopify.com/s/files/1/0647/8964/3514/files/customers_template_20_2824_29-1741832223649.csv?v=1741832226"
                }
            ]
        }
    ]
}

Change customers' status

POST https://b2b-solution-public-api.bsscommerce.com/api/v1/rf/wholesaler/:action

Replace ":action" with:

  • "approve" (if you want to approve the wholesaler account)

  • or "reject" (if you want to reject the wholesaler account)

You can only change customers' status if their accounts are in the PENDING status

Headers

Name
Value

Content-Type

application/json

Request body params

Name
Value
Required field

domain

Your store domain (i.e. abc.myshopify.com)

Required

accessKey

Your access key

Required

emails

List of customer emails Maximum: 50 emails

Required

Example

{
  "domain": "abc.myshopify.com", 
  "accessKey": "xxx",
  "emails": [
    "[email protected]",
    "[email protected]"
  ]
}

Response

{
    "success": true,
    "message": "Success",
    "approved": [
        "[email protected]"
    ],
    "errors": {
        "[email protected]": {
            "email": "Email is not exist"
        }
    }
}

Last updated

Was this helpful?