Skip to main content

Customers

Endpoint: GET /v1/customers

Retrieve the list of customers and customer branches (CustomerBsns) owned by your organization. The identifiers returned by this endpoint are required to perform quoting and booking operations throughout the platform.

Authentication required. All requests to this endpoint require a valid bearer token. See Authentication.


Overview

Each organization in Connect Enterprise owns its own set of Customers and Customer Branches (CustomerBsns). Before submitting a quote or booking, your integration must retrieve the correct customer identifiers for the target environment.

OperationRequired identifier
QuotecustomerBsn
BookingcustomerNumber + customerBsn

Customer and Branch Relationship

A Customer represents the parent entity. Each customer has one or more CustomerBsn (branch) records associated to it.

CustomerExample ← Parent customer
├── CustomerExample HQ ← Headquarter branch (isHeadquarter: true)
├── CustomerExample - KS ← Branch
└── CustomerExample - FL ← Branch

The parent customer itself also acts as a branch. This branch is the Headquarter and is identified with:

"isHeadquarter": true

Only one branch per customer can be marked as the Headquarter. The Headquarter branch is a valid branch for both quote and booking operations.


Environment Behavior

Warning Environment-specific values Customer identifiers are environment-dependent. The same customer may have different values for customerCode, customerNumber, and customerBsn in Development versus Production.

Never hardcode these values across environments. Always retrieve them dynamically using GET /v1/customers before submitting a quote or booking.


Endpoint

GET /v1/customers

Query Parameters

This endpoint supports optional pagination parameters.

ParameterTypeRequiredDefaultDescription
currentPageintNo1Page number to retrieve
resultsPerPageintNo10Number of records to return per page

Request Example

GET /v1/customers?currentPage=1&resultsPerPage=23

Response Example

{
"data": {
"totalResults": 23,
"currentPage": 1,
"totalPages": 1,
"resultsPerPage": 23,
"results": [
{
"customerId": 412381,
"organizationName": "PRIMO",
"customerName": "CustomerExample",
"customerCode": "C00001",
"customerNumber": 1235102432,
"isActive": true,
"created": "2026-05-04T15:59:10.3266667+00:00",
"createdBy": "connectenterprise@heyprimo.com",
"organizationNumber": 1,
"bsns": [
{
"customerBsn": 1237101834,
"bsnName": "CustomerExample - KS",
"isHeadquarter": true
}
]
}
]
},
"errors": null
}

Pagination Field Definitions

FieldDescription
totalResultsTotal number of customers available for the query
currentPageCurrent page returned by the endpoint
totalPagesTotal number of pages available
resultsPerPageNumber of records returned in the current page
resultsCollection of customers returned in the current request

Customer Field Definitions

FieldDescription
customerIdInternal PRIMO services identifier
organizationNameName of the organization that owns the customer
customerNameCustomer display name
customerCodeAlphanumeric customer code
customerNumberBusiness identifier used by PRIMO to uniquely identify the customer
isActiveCustomer status — if false, quote and booking operations are not allowed
createdCustomer creation timestamp
createdBySource or user that created the customer
organizationNumberInternal organization identifier in PRIMO services
bsnsCollection of CustomerBsn records associated to this customer

CustomerBsn Field Definitions

FieldDescription
customerBsnBusiness identifier used by PRIMO to uniquely identify the branch
bsnNameBranch display name
isHeadquartertrue if this branch is the main/headquarter branch of the customer

customerNumber Usage

The customerNumber value is required for booking operations.

"customerNumber": 122235102432

Retrieve this value from results[].customerNumber in the GET /v1/customers response.


customerBsn Usage

The customerBsn value is required for both quote and booking operations.

"customerBsn": 123710321872

Retrieve this value from results[].bsns[].customerBsn in the GET /v1/customers response.


Headquarter Rules

The parent customer is always represented as a branch using isHeadquarter: true.

{
"customerBsn": 123237101872,
"bsnName": "HQ",
"isHeadquarter": true
}

Key rules:

  • Only one branch per customer can be marked as Headquarter.
  • The Headquarter branch is a valid branch for quote and booking operations — treat it the same as any other branch when submitting requests.
  • If a customer has only one branch, that branch will always be the Headquarter.

Business Examples

ScenarioValue to useWhere to find it
Submit a quotecustomerBsnresults[].bsns[].customerBsn
Create a bookingcustomerNumber + customerBsnresults[].customerNumber + results[].bsns[].customerBsn
Use the headquarter branchcustomerBsn where isHeadquarter: trueresults[].bsns[] filtered by isHeadquarter
Customer is inactiveDo not proceedCheck results[].isActive before submitting