Read, query, create, and update PIMS customer records. All endpoints require the standard PIMS Open API authentication and a teamID parameter. Customer fields use raw PIMS column names (for example CUSTOMER_CODE, BNAME, BEMAIL).
Get a single customer
GET /tenant/api/pims/v1/customers/single
Retrieves one customer by PIMS Customer Code.
| Parameter | Required | Description |
|---|---|---|
teamID | Yes | Your tenant identifier. |
customerCode | Yes | The PIMS CUSTOMER_CODE to look up. |
curl -s -u 'YOUR_API_ID:YOUR_API_SECRET' \
'https://cloud.weevio.co/tenant/api/pims/v1/customers/single' \
--get \
--data-urlencode 'teamID=<YOUR-TEAM-ID>' \
--data-urlencode 'customerCode=M-1000'
Note:
The fields shown below are representative — the exact set returned depends on your PIMS configuration. The status / data / subRecords envelope is always present.
{
"status": "success",
"data": {
"CUSTOMER_CODE": "M-1000",
"CUSTOMER_NAME": "Acme Repair",
"BNAME": "Acme Repair",
"BEMAIL": "[email protected]",
"BPHONE": "800-555-1212",
"BADDRESS1": "101 Main St",
"BCITY": "Bloomington",
"BSTATE": "IN",
"BZIPCODE": "47404",
"BCOUNTRY": "US"
},
"subRecords": null
}
Query a list of customers
POST /tenant/api/pims/v1/customers/query
Returns customers matching a set of filters. The request body is an array of filter objects.
| Parameter | Required | Description |
|---|---|---|
teamID | Yes | Your tenant identifier (query param). |
maxReturn | No | Maximum number of records to return (query param), for example 10. |
Each filter object:
| Field | Required | Description |
|---|---|---|
field | Yes | A PIMS customer field name to match against (see below). |
value | Yes | The value to match. |
contains | No | true for a substring match, false (default) for an exact match. |
conjunction | No | "AND" or "OR" — how this filter combines with the previous one. Omit on the first filter. |
Common queryable customer fields include CUSTOMER_CODE, CUSTOMER_NAME, BNAME, BEMAIL, BPHONE, SNAME, SEMAIL, BCITY, BSTATE, BZIPCODE. Any PIMS CUSTOMER table field name may be used.
curl -s -u 'YOUR_API_ID:YOUR_API_SECRET' \
'https://cloud.weevio.co/tenant/api/pims/v1/customers/query?teamID=<YOUR-TEAM-ID>&maxReturn=10' \
-H 'Content-Type: application/json' \
--data '[
{ "field": "BEMAIL", "value": "[email protected]", "contains": false },
{ "field": "SEMAIL", "value": "acme.example", "contains": true, "conjunction": "OR" }
]'
{
"status": "success",
"data": [
{ "CUSTOMER_CODE": "M-1000", "CUSTOMER_NAME": "Acme Repair", "BEMAIL": "[email protected]" },
{ "CUSTOMER_CODE": "M-1001", "CUSTOMER_NAME": "Acme North", "BEMAIL": "[email protected]" }
],
"subRecords": null
}
The data array is empty when nothing matches.
Create a customer
PUT /tenant/api/pims/v1/customers/create
Creates a new customer. Send the customer's PIMS fields as a JSON object. All fields are optional and any PIMS CUSTOMER field name is accepted; you do not send a FUNCTION field (the API sets it).
curl -s -u 'YOUR_API_ID:YOUR_API_SECRET' \
'https://cloud.weevio.co/tenant/api/pims/v1/customers/create?teamID=<YOUR-TEAM-ID>' \
-H 'Content-Type: application/json' \
--data '{
"CUSTOMER_NAME": "Acme Repair",
"BNAME": "Acme Repair",
"BATTN": "Jane Doe",
"BADDRESS1": "101 Main St",
"BCITY": "Bloomington",
"BSTATE": "IN",
"BZIPCODE": "47404",
"BCOUNTRY": "US",
"BPHONE": "800-555-1212",
"BEMAIL": "[email protected]"
}'
{
"status": "success",
"data": "M-1234"
}
data is the newly assigned PIMS CUSTOMER_CODE.
Update a customer
POST /tenant/api/pims/v1/customers/update
Updates an existing customer. Send the CUSTOMER_CODE plus the fields to change. You do not send a FUNCTION field (the API sets it).
curl -s -u 'YOUR_API_ID:YOUR_API_SECRET' \
'https://cloud.weevio.co/tenant/api/pims/v1/customers/update?teamID=<YOUR-TEAM-ID>' \
-H 'Content-Type: application/json' \
--data '{
"CUSTOMER_CODE": "M-1234",
"BPHONE": "800-555-9999",
"BEMAIL": "[email protected]"
}'
{
"status": "success",
"data": "M-1234"
}
Errors
| Status | When |
|---|---|
400 | The teamID parameter is missing, or PIMS rejected the request (the body carries the underlying message). |
401 | The API ID or API Secret is missing or invalid. |
Need Help?
For assistance, please send a message to our Support page.