BusinessPartner Endpoints
The entity BusinessPartner includes relevant information about the business partners of a particular company.
Common Business Partner Characteristicsβ
-
Unique Identifier: The BusinessPartner entity consists of a unique identifier that serves to distinguish it from others and reference it easily. It also has a field
idRemote, which refers to the ID that may be stored in the customer's ERP database. -
Business Partner Data: The business partner entity stores information such as contact name, trade name, TIN, notes, etc.
-
Company: Each business partner must be associated with a company.
-
Roles: Each business partner has a role that identifies their function in the B2B environment.
-
Status: The entity's status determines the activities that a business partner can perform in the B2B environment.
-
Locations: Each business partner has one or more assigned locations. These are used to define billing or shipping addresses.
-
Contacts: We store contact information for business partners. Each one can have several contact methods assigned.
Endpointsβ
GET/BusinessPartner/getBPartnerβ
Retrieve a list of existing business partners from the database.
Descriptionβ
This endpoint retrieves a paginated list of business partners from the system. It allows clients to obtain business partner data based on pagination parameters such as the page number (page) and the number of items per page (pageSize). The response includes detailed information about each business partner, the company they belong to, their registered locations, and their contact information.
In addition, you can use the id (id), or the local id, to get the Business partner data.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | ID of the businessPartner | String optional | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"role": "string",
"status": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"companies": [
{
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
}
],
"locations": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"state": {
"id": "string",
"description": "string",
"iso": "string"
},
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"country": {
"id": "string",
"description": "string",
"iso": "string"
},
"default": true,
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"contacts": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"id": "string",
"idRemote": "string",
"contactType": "string",
"value": "string"
}
]
}
],
"billData": {
"rate": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"currency": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"paymentMethod": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"percentage": 0,
"sequence": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"updatedAt": "string",
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<role>string</role>
<status>string</status>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<companies>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
</companies>
<locations>
<location>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<address>string</address>
<city>string</city>
<state>
<id>string</id>
<description>string</description>
<iso>string</iso>
</state>
<postalCode>string</postalCode>
<shippingAddress>true</shippingAddress>
<billingAddress>true</billingAddress>
<country>
<id>string</id>
<description>string</description>
<iso>string</iso>
</country>
<default>true</default>
<active>true</active>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</location>
</locations>
<contacts>
<contact>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<position>string</position>
<default>true</default>
<active>true</active>
<contactMethods>
<method>
<id>string</id>
<idRemote>string</idRemote>
<contactType>string</contactType>
<value>string</value>
</method>
</contactMethods>
</contact>
</contacts>
<billData>
<rate>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</rate>
<currency>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</currency>
<paymentMethod>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</paymentMethod>
<iban>string</iban>
<bank>string</bank>
<swift>string</swift>
<tax>string</tax>
<taxRec>string</taxRec>
</billData>
<discounts>
<discount>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<percentage>0</percentage>
<sequence>0</sequence>
<active>string</active>
</discount>
</discounts>
<contactName>string</contactName>
<commercialName>string</commercialName>
<tin>string</tin>
<observation>string</observation>
<origin>string</origin>
<updatedAt>string</updatedAt>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/updatedFromβ
Retrieve business partners based on the provided modification date.
Descriptionβ
Return a paginated list of business partners whose last modification (date) is greater than the one provided in the parameters.
The (status) parameter can be null or may have some of these values:
- Modified
- Blocked
- New
- Synchronized
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
| Name | Description | Type | Default Value |
| ---------------- | -------------------------------------- | -------- | ----------------------- |
date | Last updated date | ||
| String required | 1999-01-01 01:00:00 | ||
status | Filter orders by status (e.g., Disabled, Modified). Accepts multiple values. | [String] | -- |
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Required Parametersβ
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"role": "string",
"status": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"companies": [
{
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
}
],
"locations": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"state": {
"id": "string",
"description": "string",
"iso": "string"
},
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"country": {
"id": "string",
"description": "string",
"iso": "string"
},
"default": true,
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"contacts": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"id": "string",
"idRemote": "string",
"contactType": "string",
"value": "string"
}
]
}
],
"billData": {
"rate": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"currency": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"paymentMethod": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"percentage": 0,
"sequence": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"updatedAt": "string",
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<role>string</role>
<status>string</status>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<companies>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
</companies>
<locations>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<address>string</address>
<city>string</city>
<state>
<id>string</id>
<description>string</description>
<iso>string</iso>
</state>
<postalCode>string</postalCode>
<shippingAddress>true</shippingAddress>
<billingAddress>true</billingAddress>
<country>
<id>string</id>
<description>string</description>
<iso>string</iso>
</country>
<default>true</default>
<active>true</active>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</locations>
<contacts>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<position>string</position>
<default>true</default>
<active>true</active>
<contactMethods>
<id>string</id>
<idRemote>string</idRemote>
<contactType>string</contactType>
<value>string</value>
</contactMethods>
</contacts>
<billData>
<rate>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</rate>
<currency>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</currency>
<paymentMethod>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</paymentMethod>
<iban>string</iban>
<bank>string</bank>
<swift>string</swift>
<tax>string</tax>
<taxRec>string</taxRec>
</billData>
<discounts>
<discount>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<percentage>0</percentage>
<sequence>0</sequence>
<active>string</active>
</discount>
</discounts>
<contactName>string</contactName>
<commercialName>string</commercialName>
<tin>string</tin>
<observation>string</observation>
<origin>string</origin>
<updatedAt>string</updatedAt>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getBPartnerStatusβ
Descriptionβ
Returns a paginated list of statuses that a BusinessPartner can have within the app
In the response the nextPageUrl could be null if all goes well
If NO PARAMETERS are attached, all Partner Status will be returned
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Responseβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"description": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getClientsβ
Retrieve business partners whose role is "customer"
Descriptionβ
Returns a paginated list of business partners whose role is "customer." The response format follows the same schema as the previous endpoints. If NO ENTITIES are found, it returns a 204 "no content" code. If NO PARAMETERS are attached, it will return all the customers.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | ID of the businessPartner (optional) | String | id optional |
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"role": "string",
"status": "string",
"agentId": [
"string"
],
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"companies": [
{
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
}
],
"locations": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"state": {
"id": "string",
"description": "string",
"iso": "string"
},
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"country": {
"id": "string",
"description": "string",
"iso": "string"
},
"default": true,
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"contacts": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"id": "string",
"idRemote": "string",
"contactType": "string",
"value": "string"
}
]
}
],
"billData": {
"rate": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"currency": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"paymentMethod": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"percentage": 0,
"sequence": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"updatedAt": "string",
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<role>string</role>
<status>string</status>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<companies>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
</companies>
<locations>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<address>string</address>
<city>string</city>
<state>
<id>string</id>
<description>string</description>
<iso>string</iso>
</state>
<postalCode>string</postalCode>
<shippingAddress>true</shippingAddress>
<billingAddress>true</billingAddress>
<country>
<id>string</id>
<description>string</description>
<iso>string</iso>
</country>
<default>true</default>
<active>true</active>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</locations>
<contacts>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<position>string</position>
<default>true</default>
<active>true</active>
<contactMethods>
<id>string</id>
<idRemote>string</idRemote>
<contactType>string</contactType>
<value>string</value>
</contactMethods>
</contacts>
<billData>
<rate>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</rate>
<currency>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</currency>
<paymentMethod>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</paymentMethod>
<iban>string</iban>
<bank>string</bank>
<swift>string</swift>
<tax>string</tax>
<taxRec>string</taxRec>
</billData>
<discounts>
<discount>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<percentage>0</percentage>
<sequence>0</sequence>
<active>string</active>
</discount>
</discounts>
<contactName>string</contactName>
<commercialName>string</commercialName>
<tin>string</tin>
<observation>string</observation>
<origin>string</origin>
<updatedAt>string</updatedAt>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getAgentsβ
Retrieve business partners whose role is "agent"
Descriptionβ
Returns a paginated list of business partners whose role is "representative." The response format follows the schema of the previous endpoints. If no entities are found, it returns a 204 "empty" code.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"role": "string",
"status": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"companies": [
{
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
}
],
"locations": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"state": {
"id": "string",
"description": "string",
"iso": "string"
},
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"country": {
"id": "string",
"description": "string",
"iso": "string"
},
"default": true,
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"contacts": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"id": "string",
"idRemote": "string",
"contactType": "string",
"value": "string"
}
]
}
],
"billData": {
"rate": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"currency": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"paymentMethod": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"percentage": 0,
"sequence": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"updatedAt": "string",
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<role>string</role>
<status>string</status>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<companies>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
</companies>
<locations>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<address>string</address>
<city>string</city>
<state>
<id>string</id>
<description>string</description>
<iso>string</iso>
</state>
<postalCode>string</postalCode>
<shippingAddress>true</shippingAddress>
<billingAddress>true</billingAddress>
<country>
<id>string</id>
<description>string</description>
<iso>string</iso>
</country>
<default>true</default>
<active>true</active>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</locations>
<contacts>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<position>string</position>
<default>true</default>
<active>true</active>
<contactMethods>
<id>string</id>
<idRemote>string</idRemote>
<contactType>string</contactType>
<value>string</value>
</contactMethods>
</contacts>
<billData>
<rate>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</rate>
<currency>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</currency>
<paymentMethod>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</paymentMethod>
<iban>string</iban>
<bank>string</bank>
<swift>string</swift>
<tax>string</tax>
<taxRec>string</taxRec>
</billData>
<discounts>
<discount>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<percentage>0</percentage>
<sequence>0</sequence>
<active>string</active>
</discount>
</discounts>
<contactName>string</contactName>
<commercialName>string</commercialName>
<tin>string</tin>
<observation>string</observation>
<origin>string</origin>
<updatedAt>string</updatedAt>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getClientsAssignedToAgentβ
Retrieve business partners whose role is "client" and have an "agent" assigned.
Descriptionβ
Returns a paginated list of business partners whose role is "customer" and are assigned to another partner with the role "representative." If no entities are found, it returns a 204 "empty" code.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"companyId": "string",
"agentId": "string",
"clients": [
{
"id": "string"
}
]
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<companyId>string</companyId>
<agentId>string</agentId>
<clients>
<id>string</id>
</clients>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getContactsβ
Get a paginated list with the contact information assigned to each business partner.
Descriptionβ
Returns a paginated list that includes contact information for each business partner registered in the system.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"businessPartner": {
"id": "string",
"contactName": "string"
},
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"contactType": {
"id": "string",
"value": "string"
},
"value": "string"
}
]
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<businessPartner>
<id>string</id>
<contactName>string</contactName>
</businessPartner>
<name>string</name>
<position>string</position>
<default>true</default>
<active>true</active>
<contactMethods>
<item>
<contactType>
<id>string</id>
<value>string</value>
</contactType>
<value>string</value>
</item>
</contactMethods>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
GET/BusinessPartner/getContactTypesβ
Get a list of all contact types existing in the B2B context.
Descriptionβ
Returns a paginated list of all available contact types. This is useful for understanding the available types and assigning them correctly to a business partner.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"value": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XMLβ
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<value>string</value>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
πTry it outπ±
POST/BusinessPartner/createβ
Create a new business partner in the database.
POST Method Details:β
Creates a new record based on the data provided in the request body. To register a new business partner in the system, you must ensure that the following entities exist:
-
Creation of Role: Each business partner must be associated with a role. Therefore, the role you assign to the new business partner must exist in the system. πRegister Roleπ±
-
Creation of Status: Similarly, a business partner is assigned a status. The status assigned to the new business partner must exist in the system.
-
Creation of Company: It is crucial that the company related to the new business partner exists in the system.
πRegister Companyπ±
The contacts assigned when creating a business partner are created instantly and do not need to reference existing fields. However, for locations we have two options:
- Create a new location: If the location that we want to associate with the business partner does not exist, we can attach the necessary data to the
locationsfield to create a new location. We see this option in the JSON of this method. - Reference a location: If the location that we want to associate with the business partner exists, we can reference it with the
locationIdparameter within thelocationsfield. The field layout is as follows:
{
"locations": [
{
"locationId": "string"
}
]
}
The idRemote fields provided when creating a new entity correspond to the remote idRemote that the user wants to give it. The system will automatically create a local id. As for the agentId field, it is optional since we can decide whether to associate an agent or not.
Required Parametersβ
| Name | Description | Type |
|---|---|---|
idRemote | New Business Partner ID | String |
roleId | New Business Partner Role ID | String |
statusId | New Business Partner Status ID | String |
companyId | New Business Partner Company ID | String |
contactName | New Business Partner Contact Name | String |
commercialName | New Business Partner Commercial Name | String |
tin | New Business Partner Identity Card | String |
observation | Business Partner Observation | String |
origin | New Business Partner origin Card | String |
active | Whether the business partner is active or not | Boolean |
Mandatory parameters for Companies.β
To assign a new related Company to the Business Partner you must take into account that the following parameters are mandatory:
| Name | Description | Type |
|---|---|---|
idRemote | Company ID | String |
Mandatory parameters for Locationsβ
If you want to assign a new Location to the Business Partner you must take into account that the following parameters are mandatory:
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new Location | String |
name | Name of the new Location | String |
address | Full address of the new Location | String |
city | City/Town of the new Location | String |
stateId | Valid identifier of the State of the new Location | String |
postalCode | Postal Code of the new Location | String |
shippingAddress | If it is the default shipping address | Boolean |
billingAddress | If it is the default billing address | Boolean |
countryId | Valid identifier of the Country of the new Location | String |
default | If the new Location is the default Location | Boolean |
active | If the new Location is active | Boolean |
Mandatory parameters for Contacts.β
To assign a new Contact to the Business Partner you must take into account that the following parameters are mandatory:
| Name | Description | Type |
|---|---|---|
idRemote | Remote ID | String |
name | Name of the new Contact | String |
position | Position of the new Contact | String |
default | If the new Contact is the default contact | Boolean |
active | If the new Contact is active | Boolean |
Mandatory parameters for Contact/ContactMethods.β
To assign a new contact method to the Business Partner you must take into account that the following mandatory parameters :
| Name | Description | Type |
|------------------|------------
| idRemote | Remote ID | String |
| contactTypeId| Type of contact | String |
| value | Value of the contact field | String |
Mandatory parameters for BillData.β
To assign a new Bill to the Business Partner you must take into account that the following mandatory parameters :
| Name | Description | Type |
|---|---|---|
rateId | ID bill | String |
currencyIso | ISO currency code | String |
paymentMethodId | Payment method ID | String |
iban | IBAN number | String |
bank | Bank name | String |
swift | SWIFT code | String |
tax | Tax | String |
taxRec | Tax receivable | String |
Mandatory parameters for Discounts.β
To assign a new Discounts to the Business Partner you must take into account that the following mandatory parameters :
| Name | Description | Type |
|---|---|---|
idRemote | Remote discount ID | String |
discountTypeId | Discount type ID | String |
sequence | Discount sequence | Number |
percentage | Discount percentage | Number |
active | Active status | String |
All contactMethods parameters are mandatory.
Complete request bodyβ
[
{
"idRemote": "string",
"roleId": "string",
"statusId": "string",
"companyId": "string",
"agentId": "string",
"companies": [
{
"idRemote": "string"
}
],
"locations": [
{
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"stateId": "string",
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"countryId": "string",
"default": true,
"active": true
}
],
"contacts": [
{
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"idRemote" : "string",
"contactTypeId": "string",
"value": "string"
}
]
}
],
"billData": {
"rateId": "string",
"currencyIso": "string",
"paymentMethodId": "string",
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"percentage": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"active": true
}
]
It is possible to add multiple business partners through the same request by separating them with commas within the array in the body of the request.
Responsesβ
To avoid overloading the server, this endpoint sends a message to a consumer responsible for processing the request. To check the status of the submitted request, you need to access the URL provided in the response. A successfully sent message to the consumer should look like this:
{
"code": 201,
"message": "BusinessPartner message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the request's status. A request successfully processed by the consumer will look like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid business partner data format, a required parameter is missing"
}
πTry it outπ±
POST/BusinessPartner/assignClientsToAgentβ
Assigns the client list attached in the body of the request to the agent and company.
POST Method Detailsβ
To perform the operation, you must ensure that the business partners you are assigning to the agent have the role of client. Likewise, the agent must have the role of representative. It is important to ensure that both the customers and the agent belong to the same company. You can assign many customers to the same agent in a single operation.
All body parameters are required.
The request body must follow the following schema in JSON format:
[
{
"agentId": "string",
"clients": [
{
"idRemote": "string"
}
]
}
]
πTry it outπ±
PUT/BusinessPartner/update/{id}β
Update an existing business partner.
Descriptionβ
This endpoint allows clients to update business partner data using the id parameter. This idRemote field can either be the idRemote from the company using this B2B or the local id created by the system.
Through this endpoint, it is possible to update the locations and contacts associated with the business partner.
Required Parametersβ
| Name | Description | Type |
|---|---|---|
id | Business Partner identifier | String required |
You don't need to include the entire JSON structure, just include the attributes you want to modify.
Request bodyβ
The request body must include the data to update for the business partner, following this schema:
{
"roleId": "string",
"statusId": "string",
"companyId": "string",
"companies": [
{
"idRemote": "string"
}
],
"locations": [
{
"idRemote": "string",
"name": "string",
"address": "string",
"city": "string",
"stateId": "string",
"postalCode": "string",
"shippingAddress": true,
"billingAddress": true,
"country": {
"id": "string",
"description": "string",
"iso": "string"
},
"default": true,
"active": true
}
],
"contacts": [
{
"idRemote": "string",
"name": "string",
"position": "string",
"default": true,
"active": true,
"contactMethods": [
{
"idRemote": "string",
"contactTypeId": "string",
"value": "string"
}
]
}
],
"billData": {
"rateId": "string",
"currencyIso": "string",
"paymentMethodId": "string",
"iban": "string",
"bank": "string",
"swift": "string",
"tax": "string",
"taxRec": "string"
},
"discounts": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"percentage": 0,
"active": "string"
}
],
"contactName": "string",
"commercialName": "string",
"tin": "string",
"observation": "string",
"origin": "string",
"active": true
}
πTry it outπ±
DELETEBusinessPartner/delete/{id}β
Remove an existing business partner. The id parameter can be either the remote id or the local id.
Descriptionβ
Deletes a business partner and all associated locations and contacts. The id parameter can be either the remote id or the local id. Once deleted, the business partner is logged in the Deleted History.
β οΈA Business Partner cannot be deleted if it is related to an Invoice, Delivery Note or Order.
Parametersβ
| Name | Description | Type |
|---|---|---|
id | Unique identifier | String required |
πTry it outπ±
DELETEBusinessPartner/BPartnerContact/{bPartnerId}β
Remove an existing business partner. The bPartnerId parameter can be either the remote id or the local id.
Descriptionβ
Deletes a business partner and all associated locations and contacts. The bPartnerId parameter can be either the remote id or the local id. Once deleted, the business partner is logged in the Deleted History.
β οΈA Business Partner cannot be deleted if it is related to an Invoice, Delivery Note or Order.
Parametersβ
| Name | Description | Type |
|---|---|---|
bPartnerId | Unique identifier | String required |
contactId | Unique, or remote, identifier of the contact Id | String |
πTry it outπ±
DELETEBusinessPartner/BPartnerDiscount/{bPartnerId}β
Remove an existing business partner. The bPartnerId parameter can be either the remote id or the local id.
Descriptionβ
Deletes a business partner and all associated locations and contacts. The bPartnerId parameter can be either the remote id or the local id. Once deleted, the business partner is logged in the Deleted History.
β οΈA Business Partner cannot be deleted if it is related to an Invoice, Delivery Note or Order.
Parametersβ
| Name | Description | Type |
|---|---|---|
bPartnerId | Unique identifier | String required |
discountId | Unique, or remote, identifier of the discount Id | String |
πTry it outπ±
Possible Response Errorsβ
| Error | Response Status | Response Body |
|---|---|---|
| This error occurs when a connection to the database cannot be established. It is an internal server problem. | 500 | {"code": 500,"error": "Database connection failed."} |
| This error occurs when you cannot insert or update items into the database. | 500 | {"code": 500,"error": "Invalid connection name, you cannot insert in default"} |
| This error occurs when a parameter is missing. | 400 | {"code": 400,"error": "Parameter $parameter is required"} |
| This error occurs when you are not authorized. | 401 | {"code": 401,"error": "Unauthorized."} |
| This error occurs when the BusinessPartner could not be found. | 404 | {"code": 404,"error": "No entity found for Characteristic."} |
| This error occurs when you try to insert an Characteristic that already exists. | 409 | {"code": 409,"error": "Duplicate entry"} |
| This error occurs when you try to send too many requests in a short period of time. | 429 | {"code": 429,"error": "Too Many Requests"} |