Update Customer Status - Venddor API Documentation

Update Customer Status

This endpoint allows you to update a customer's status, credit limits, payment methods, and user group assignments in the e-commerce platform.

Endpoint URL: /api/customer/
POST /api/customer/

Updates customer settings including status, credit limit, payment methods, and user group assignments.

Tip: You can update multiple customers in a single request. We recommend sending a maximum of 50 CNPJs per request for optimal performance.

Authentication

Use Basic Authentication with your vendor credentials:

Authorization: Basic {base64_encoded_credentials}

Request Parameters

Required Parameters

Parameter Type Required Description
CNPJ* string Yes The customer's CNPJ (Brazilian company registration number) that will be updated

Optional Parameters

Parameter Type Required Description
status string No Customer's status in the e-commerce platform
A - Active (can place orders if credit limit is available)
D - Disabled (cannot place orders even with available credit)
limit string No Maximum amount the customer can have in outstanding orders. Use decimal point (not comma) as the separator. If not provided, the default value of R$ 99,999,999.00 will be assigned. The value should already account for any outstanding orders.

Payment Methods Configuration

Use the payments array to specify which payment methods are available for the customer:

Parameter Type Required Description
code string Yes (if using payments) The internal payment method code configured in the Seller Center
status string Yes (if using payments) A - Customer can view and use this payment method
D - Payment method is hidden and unavailable for this customer

User Groups Configuration

Use the usergroups array to manage the customer's group assignments:

Parameter Type Required Description
code string Yes (if using usergroups) The internal code of the user group configured in the Seller Center
status string Yes (if using usergroups) A - Customer is included in this user group
D - Customer is excluded from this user group

Request Example

Request Body
Success Response (200)
[
          {
         "CNPJ":"27547771000150",
         "limit":"47894.99",
         "status":"A",
         "payments": [
            {
               "code":"CARX",
               "status":"A"
            },
            {
               "code":"DINH",
               "status":"D"
            }
         ],
         "usergroups": [
            {
                "code":"51",
                "status":"A"
            }
         ]
      }
]
{
    "count": 1
}

Response Status Codes

Status Code Description
200 OK Customer status(es) successfully updated
400 Bad Request Invalid request format or missing required fields
401 Unauthorized Missing or invalid authentication credentials
404 Not Found One or more CNPJs not found in the system

Response Fields

Field Type Description
count integer The number of customers successfully updated
Note: When managing payments and user groups, you only need to include the ones you want to modify. Any existing assignments not mentioned in the request will remain unchanged.
Important: The credit limit (limit) should already account for any outstanding amounts. For example, if a customer has a total credit of $100,000 and currently has $20,000 in open orders, you should set the limit to $80,000 to prevent them from exceeding their total credit.