📄 MIPYME Documents
Creates a new customer/supplier
POST
Endpoint URL
https://api-billing.koywe.com/V1/customers_suppliers
Adds a new customer/supplier with the provided details.
Parameters
No parameters.
Request body — fields
| Field | Type | Required | Description |
|---|---|---|---|
account_id | integer | Always required | Associated account. |
name | string | Always required | Name of the customer or supplier. |
is_customer | boolean | Optional | Indicates if the entity is a customer. |
is_supplier | boolean | Optional | Indicates if the entity is a supplier. |
responsible_user_id | integer | Optional | ID of the user responsible for this entity. |
payment_term | string | Optional | Payment terms for the customer or supplier. |
contacts | array<object> | Optional | List of contacts associated with the customer or supplier. |
contacts[].first_name | string | Optional | First name of the contact. |
contacts[].last_name | string | Optional | Last name of the contact. |
contacts[].phone | string | Optional | Phone number of the contact. |
contacts[].email | string | Optional | Email address of the contact. |
invoicing_details | array<object> | Optional | List of invoicing details associated with the customer or supplier. |
invoicing_details[].country_id | string | Optional | Identifier for the country. |
invoicing_details[].tax_id_type | string | Optional | Type of tax ID. |
invoicing_details[].tax_id_code | string | Optional | Tax ID code. |
invoicing_details[].legal_name | string | Optional | Legal name of the entity. |
invoicing_details[].address | string | Optional | Address of the entity. |
invoicing_details[].district | string | Optional | District of the address. |
invoicing_details[].city | string | Optional | City of the address. |
invoicing_details[].business_activity | string | Optional | Business activity of the entity. |
invoicing_details[].phone | string | Optional | Phone number for invoicing purposes. |
invoicing_details[].postal_code | string | Optional | Postal code of the address. |
additional | object | Optional | Additional data associated with the customer or supplier. |
additional.data_name_1 | string | Optional | Name of additional data field 1. |
additional.data_value_1 | string | Optional | Value of additional data field 1. |
additional.data_name_2 | string | Optional | Name of additional data field 2. |
additional.data_value_2 | string | Optional | Value of additional data field 2. |
additional.data_name_3 | string | Optional | Name of additional data field 3. |
additional.data_value_3 | string | Optional | Value of additional data field 3. |
additional.data_name_4 | string | Optional | Name of additional data field 4. |
additional.data_value_4 | string | Optional | Value of additional data field 4. |
additional.data_name_5 | string | Optional | Name of additional data field 5. |
additional.data_value_5 | string | Optional | Value of additional data field 5. |
Request body — JSON example
{
"account_id": 0,
"name": "string",
"is_customer": true,
"is_supplier": true,
"responsible_user_id": 0,
"payment_term": "0,30",
"contacts": [
{
"first_name": "string",
"last_name": "string",
"phone": "string",
"email": "string"
}
],
"invoicing_details": [
{
"country_id": "string",
"tax_id_type": "string",
"tax_id_code": "string",
"legal_name": "string",
"address": "string",
"district": "string",
"city": "string",
"business_activity": "string",
"phone": "string",
"postal_code": "string"
}
],
"additional": {
"data_name_1": "string",
"data_value_1": "string",
"data_name_2": "string",
"data_value_2": "string",
"data_name_3": "string",
"data_value_3": "string",
"data_name_4": "string",
"data_value_4": "string",
"data_name_5": "string",
"data_value_5": "string"
}
}
Responses
201
Product created successfully.