Skip to content

Order​


Get Order by id​

GET
/orders/{id}

Returns a single order by its id.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Responses​

Successful operation

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"date": "2026-08-14T14:04:16",
  
  
"fk_id": "string",
  
  
"status": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"freight": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"value": 0,
  
  
  
"fk_id": "string"
  
  
},
  
  
"customer": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"user": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"observations": "string",
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
"opportunity": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"quotation": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
},
  
  
"payment_type": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"payment_method": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"category": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"shipping_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"address": {
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"branch_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"total_value": 0,
  
  
"items": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"item": {
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"type": "string"
  
  
  
  
},
  
  
  
  
"quantity": 0,
  
  
  
  
"price": 0,
  
  
  
  
"description": "string",
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
"unit_liq": 0,
  
  
  
  
"perc_desc": 0,
  
  
  
  
"vlr_desc": 0,
  
  
  
  
"total_liq": 0,
  
  
  
  
"fk_id": "string",
  
  
  
  
"base_icms_st": 0,
  
  
  
  
"icms_st": 0,
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
"base_ipi": 0,
  
  
  
  
"ipi": 0,
  
  
  
  
"value_ipi": 0,
  
  
  
  
"base_icms": 0,
  
  
  
  
"icms": 0,
  
  
  
  
"vlr_icms": 0,
  
  
  
  
"recurrency_period": 0
  
  
  
}
  
  
],
  
  
"custom_fields": {
  
  
  
"additionalProperties": null
  
  
}
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Delete Order​

DELETE
/orders/{id}

Deletes a order.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Responses​

Resource deleted successfully

application/json
JSON
{
  
"success": true,
  
"message": "Deleted successfully",
  
"deletedId": 0,
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Update Order​

PATCH
/orders/{id}

Updates an existing order.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Request Body​

application/json
JSON
{
  
"date": "2026-08-14T14:04:15",
  
"id_customer": 0,
  
"id_user": 0,
  
"fk_id": "string",
  
"id_payment_type": 0,
  
"id_payment_method": 0,
  
"id_order_status": 0,
  
"id_category": 0,
  
"id_freight_type": 0,
  
"freight_value": 0,
  
"id_shipping_company": 0,
  
"id_address": 0,
  
"observations": "string",
  
"delivery_date": "2026-08-14T14:04:15",
  
"id_branch_company": 0,
  
"custom_fields": {
  
  
"additionalProperties": "string"
  
}
}

Responses​

Resource updated successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"date": "2026-08-14T14:04:16",
  
  
"fk_id": "string",
  
  
"status": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"freight": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"value": 0,
  
  
  
"fk_id": "string"
  
  
},
  
  
"customer": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"user": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"observations": "string",
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
"opportunity": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"quotation": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
},
  
  
"payment_type": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"payment_method": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"category": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"shipping_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"address": {
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"branch_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"total_value": 0,
  
  
"items": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"item": {
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"type": "string"
  
  
  
  
},
  
  
  
  
"quantity": 0,
  
  
  
  
"price": 0,
  
  
  
  
"description": "string",
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
"unit_liq": 0,
  
  
  
  
"perc_desc": 0,
  
  
  
  
"vlr_desc": 0,
  
  
  
  
"total_liq": 0,
  
  
  
  
"fk_id": "string",
  
  
  
  
"base_icms_st": 0,
  
  
  
  
"icms_st": 0,
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
"base_ipi": 0,
  
  
  
  
"ipi": 0,
  
  
  
  
"value_ipi": 0,
  
  
  
  
"base_icms": 0,
  
  
  
  
"icms": 0,
  
  
  
  
"vlr_icms": 0,
  
  
  
  
"recurrency_period": 0
  
  
  
}
  
  
],
  
  
"custom_fields": {
  
  
  
"additionalProperties": null
  
  
}
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Search Orders​

GET
/orders

Search and list orders with filtering, sorting, and pagination.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Query Parameters

fk_id
Type
string
create_date_from
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
create_date_to
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
update_date_from
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
update_date_to
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
order_date_from
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
order_date_to
Type
string
Example"2026-08-14T14:04:15"
Format
"date-time"
id_customer

ID of the Customer

Type
integer
Minimum
1
id_quotation

ID of the Quotation

Type
integer
Minimum
1
limit
Type
integer
Minimum
1
Maximum
100
Default
25
page
Type
integer
Minimum
1
Default
1
sort
Type
string
Valid values
"id""created_at""updated_at""date""id_customer""-id""-created_at""-updated_at""-date""-id_customer"

Responses​

Successful operation

application/json
JSON
{
  
"data": [
  
  
{
  
  
  
"id": 0,
  
  
  
"date": "2026-08-14T14:04:16",
  
  
  
"fk_id": "string",
  
  
  
"status": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"freight": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"value": 0,
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"customer": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"user": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"observations": "string",
  
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
  
"opportunity": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"quotation": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string"
  
  
  
},
  
  
  
"payment_type": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"payment_method": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"category": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"shipping_company": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"address": {
  
  
  
  
"id": 0,
  
  
  
  
"street": "string",
  
  
  
  
"number": 0,
  
  
  
  
"complement": "string",
  
  
  
  
"zip_code": 0,
  
  
  
  
"neighborhood": "string",
  
  
  
  
"city": "string",
  
  
  
  
"state": "string",
  
  
  
  
"latitude": 0,
  
  
  
  
"longitude": 0,
  
  
  
  
"address_type": "string",
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"branch_company": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"fk_id": "string"
  
  
  
},
  
  
  
"total_value": 0,
  
  
  
"items": [
  
  
  
  
{
  
  
  
  
  
"id": 0,
  
  
  
  
  
"item": {
  
  
  
  
  
  
"id": 0,
  
  
  
  
  
  
"name": "string",
  
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
  
"type": "string"
  
  
  
  
  
},
  
  
  
  
  
"quantity": 0,
  
  
  
  
  
"price": 0,
  
  
  
  
  
"description": "string",
  
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
  
"unit_liq": 0,
  
  
  
  
  
"perc_desc": 0,
  
  
  
  
  
"vlr_desc": 0,
  
  
  
  
  
"total_liq": 0,
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"base_icms_st": 0,
  
  
  
  
  
"icms_st": 0,
  
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
  
"base_ipi": 0,
  
  
  
  
  
"ipi": 0,
  
  
  
  
  
"value_ipi": 0,
  
  
  
  
  
"base_icms": 0,
  
  
  
  
  
"icms": 0,
  
  
  
  
  
"vlr_icms": 0,
  
  
  
  
  
"recurrency_period": 0
  
  
  
  
}
  
  
  
],
  
  
  
"custom_fields": {
  
  
  
  
"additionalProperties": null
  
  
  
}
  
  
}
  
],
  
"pagination": {
  
  
"page": 1,
  
  
"limit": 25,
  
  
"total": 100,
  
  
"totalPages": 4,
  
  
"hasNext": true,
  
  
"hasPrev": false,
  
  
"links": {
  
  
  
"self": "/orders?page=1&limit=25",
  
  
  
"first": "/orders?page=1&limit=25",
  
  
  
"last": "/orders?page=4&limit=25",
  
  
  
"next": "/orders?page=2&limit=25",
  
  
  
"prev": "string"
  
  
}
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create Order​

POST
/orders

Creates a new order.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Request Body​

application/json
JSON
{
  
"date": "2026-08-14T14:04:15",
  
"id_customer": 0,
  
"id_user": 0,
  
"fk_id": "string",
  
"id_payment_type": 0,
  
"id_payment_method": 0,
  
"id_order_status": 0,
  
"id_category": 0,
  
"id_freight_type": 0,
  
"freight_value": 0,
  
"id_shipping_company": 0,
  
"id_address": 0,
  
"observations": "string",
  
"delivery_date": "2026-08-14T14:04:15",
  
"id_branch_company": 0,
  
"custom_fields": {
  
  
"additionalProperties": "string"
  
},
  
"items": [
  
  
{
  
  
  
"id_item": 0,
  
  
  
"quantity": 0,
  
  
  
"price": 0,
  
  
  
"total_item": 0,
  
  
  
"description": "string",
  
  
  
"discount_value": 0,
  
  
  
"discount_percentage": 0,
  
  
  
"net_unit_value": 0,
  
  
  
"net_value": 0,
  
  
  
"base_icms_st": 0,
  
  
  
"aliq_icms_st": 0,
  
  
  
"value_icms_st": 0,
  
  
  
"base_ipi": 0,
  
  
  
"aliq_ipi": 0,
  
  
  
"value_ipi": 0,
  
  
  
"base_icms": 0,
  
  
  
"aliq_icms": 0,
  
  
  
"value_icms": 0
  
  
}
  
]
}

Responses​

Resource created successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"date": "2026-08-14T14:04:16",
  
  
"fk_id": "string",
  
  
"status": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"freight": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"value": 0,
  
  
  
"fk_id": "string"
  
  
},
  
  
"customer": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"user": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"observations": "string",
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
"opportunity": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"quotation": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
},
  
  
"payment_type": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"payment_method": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"category": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"shipping_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"address": {
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"branch_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"total_value": 0,
  
  
"items": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"item": {
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"type": "string"
  
  
  
  
},
  
  
  
  
"quantity": 0,
  
  
  
  
"price": 0,
  
  
  
  
"description": "string",
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
"unit_liq": 0,
  
  
  
  
"perc_desc": 0,
  
  
  
  
"vlr_desc": 0,
  
  
  
  
"total_liq": 0,
  
  
  
  
"fk_id": "string",
  
  
  
  
"base_icms_st": 0,
  
  
  
  
"icms_st": 0,
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
"base_ipi": 0,
  
  
  
  
"ipi": 0,
  
  
  
  
"value_ipi": 0,
  
  
  
  
"base_icms": 0,
  
  
  
  
"icms": 0,
  
  
  
  
"vlr_icms": 0,
  
  
  
  
"recurrency_period": 0
  
  
  
}
  
  
],
  
  
"custom_fields": {
  
  
  
"additionalProperties": null
  
  
}
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Body

Samples​


Delete Order item​

DELETE
/orders/{id_order}/items/{id}

Deletes a order item.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id_order*

ID of the order

Type
integer
Required
id*

ID of the resource

Type
integer
Required

Responses​

Resource deleted successfully

application/json
JSON
{
  
"success": true,
  
"message": "Deleted successfully",
  
"deletedId": 0,
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Update Order item​

PATCH
/orders/{id_order}/items/{id}

Updates an existing order item.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id_order*

ID of the order

Type
integer
Required
id*

ID of the resource

Type
integer
Required

Request Body​

application/json
JSON
{
  
"id_item": 0,
  
"quantity": 0,
  
"price": 0,
  
"total_item": 0,
  
"description": "string",
  
"discount_value": 0,
  
"discount_percentage": 0,
  
"net_unit_value": 0,
  
"net_value": 0,
  
"base_icms_st": 0,
  
"aliq_icms_st": 0,
  
"value_icms_st": 0,
  
"base_ipi": 0,
  
"aliq_ipi": 0,
  
"value_ipi": 0,
  
"base_icms": 0,
  
"aliq_icms": 0,
  
"value_icms": 0
}

Responses​

Resource updated successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"date": "2026-08-14T14:04:16",
  
  
"fk_id": "string",
  
  
"status": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"freight": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"value": 0,
  
  
  
"fk_id": "string"
  
  
},
  
  
"customer": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"user": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"observations": "string",
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
"opportunity": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"quotation": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
},
  
  
"payment_type": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"payment_method": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"category": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"shipping_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"address": {
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"branch_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"total_value": 0,
  
  
"items": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"item": {
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"type": "string"
  
  
  
  
},
  
  
  
  
"quantity": 0,
  
  
  
  
"price": 0,
  
  
  
  
"description": "string",
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
"unit_liq": 0,
  
  
  
  
"perc_desc": 0,
  
  
  
  
"vlr_desc": 0,
  
  
  
  
"total_liq": 0,
  
  
  
  
"fk_id": "string",
  
  
  
  
"base_icms_st": 0,
  
  
  
  
"icms_st": 0,
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
"base_ipi": 0,
  
  
  
  
"ipi": 0,
  
  
  
  
"value_ipi": 0,
  
  
  
  
"base_icms": 0,
  
  
  
  
"icms": 0,
  
  
  
  
"vlr_icms": 0,
  
  
  
  
"recurrency_period": 0
  
  
  
}
  
  
],
  
  
"custom_fields": {
  
  
  
"additionalProperties": null
  
  
}
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Create Order item​

POST
/orders/{id_order}/items

Creates a new order item.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id_order*

ID of the order

Type
integer
Required

Request Body​

application/json
JSON
{
  
"id_item": 0,
  
"quantity": 0,
  
"price": 0,
  
"total_item": 0,
  
"description": "string",
  
"discount_value": 0,
  
"discount_percentage": 0,
  
"net_unit_value": 0,
  
"net_value": 0,
  
"base_icms_st": 0,
  
"aliq_icms_st": 0,
  
"value_icms_st": 0,
  
"base_ipi": 0,
  
"aliq_ipi": 0,
  
"value_ipi": 0,
  
"base_icms": 0,
  
"aliq_icms": 0,
  
"value_icms": 0
}

Responses​

Resource created successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"date": "2026-08-14T14:04:16",
  
  
"fk_id": "string",
  
  
"status": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"freight": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"value": 0,
  
  
  
"fk_id": "string"
  
  
},
  
  
"customer": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"user": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"observations": "string",
  
  
"delivery_date": "2026-08-14T14:04:16",
  
  
"opportunity": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"quotation": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
},
  
  
"payment_type": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"payment_method": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"category": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"shipping_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"address": {
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"branch_company": {
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
},
  
  
"total_value": 0,
  
  
"items": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"item": {
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"fk_id": "string",
  
  
  
  
  
"type": "string"
  
  
  
  
},
  
  
  
  
"quantity": 0,
  
  
  
  
"price": 0,
  
  
  
  
"description": "string",
  
  
  
  
"created_at": "2026-08-14T14:04:16",
  
  
  
  
"unit_liq": 0,
  
  
  
  
"perc_desc": 0,
  
  
  
  
"vlr_desc": 0,
  
  
  
  
"total_liq": 0,
  
  
  
  
"fk_id": "string",
  
  
  
  
"base_icms_st": 0,
  
  
  
  
"icms_st": 0,
  
  
  
  
"vlr_icms_st": 0,
  
  
  
  
"base_ipi": 0,
  
  
  
  
"ipi": 0,
  
  
  
  
"value_ipi": 0,
  
  
  
  
"base_icms": 0,
  
  
  
  
"icms": 0,
  
  
  
  
"vlr_icms": 0,
  
  
  
  
"recurrency_period": 0
  
  
  
}
  
  
],
  
  
"custom_fields": {
  
  
  
"additionalProperties": null
  
  
}
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


List Customer addresses​

GET
/customers/{customerId}/address

Lists customer addresses.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

customerId*

External ID of the customerId

Type
string
Required

Query Parameters

limit
Type
number
Minimum
1
Maximum
100
offset
Type
number
Minimum
0

Responses​

Successful operation

application/json
JSON
{
  
"data": [
  
  
{
  
  
  
"id": 0,
  
  
  
"street": "string",
  
  
  
"number": 0,
  
  
  
"complement": "string",
  
  
  
"zip_code": 0,
  
  
  
"neighborhood": "string",
  
  
  
"city": "string",
  
  
  
"state": "string",
  
  
  
"latitude": 0,
  
  
  
"longitude": 0,
  
  
  
"address_type": "string",
  
  
  
"name": "string",
  
  
  
"fk_id": "string"
  
  
}
  
],
  
"pagination": {
  
  
"page": 1,
  
  
"limit": 25,
  
  
"total": 100,
  
  
"totalPages": 4,
  
  
"hasNext": true,
  
  
"hasPrev": false,
  
  
"links": {
  
  
  
"self": "/orders?page=1&limit=25",
  
  
  
"first": "/orders?page=1&limit=25",
  
  
  
"last": "/orders?page=4&limit=25",
  
  
  
"next": "/orders?page=2&limit=25",
  
  
  
"prev": "string"
  
  
}
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create Customer address​

POST
/customers/{customerId}/address

Creates a new customer address.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

customerId*

External ID of the customerId

Type
string
Required

Request Body​

application/json
JSON
{
  
"street": "string",
  
"number": 0,
  
"complement": "string",
  
"zip_code": 0,
  
"neighborhood": "string",
  
"city": "string",
  
"state": "string",
  
"latitude": 0,
  
"longitude": 0,
  
"address_type": "string",
  
"name": "string",
  
"fk_id": "string"
}

Responses​

Resource created successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"street": "string",
  
  
"number": 0,
  
  
"complement": "string",
  
  
"zip_code": 0,
  
  
"neighborhood": "string",
  
  
"city": "string",
  
  
"state": "string",
  
  
"latitude": 0,
  
  
"longitude": 0,
  
  
"address_type": "string",
  
  
"name": "string",
  
  
"fk_id": "string"
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Get Customer address by id​

GET
/customers/address/{id}

Returns a single customer address by its id.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Responses​

Successful operation

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"street": "string",
  
  
"number": 0,
  
  
"complement": "string",
  
  
"zip_code": 0,
  
  
"neighborhood": "string",
  
  
"city": "string",
  
  
"state": "string",
  
  
"latitude": 0,
  
  
"longitude": 0,
  
  
"address_type": "string",
  
  
"name": "string",
  
  
"fk_id": "string"
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Delete Customer address​

DELETE
/customers/address/{id}

Deletes a customer address.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Responses​

Resource deleted successfully

application/json
JSON
{
  
"success": true,
  
"message": "Deleted successfully",
  
"deletedId": 0,
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Update Customer address​

PATCH
/customers/address/{id}

Updates an existing customer address.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Request Body​

application/json
JSON
{
  
"street": "string",
  
"number": 0,
  
"complement": "string",
  
"zip_code": 0,
  
"neighborhood": "string",
  
"city": "string",
  
"state": "string",
  
"latitude": 0,
  
"longitude": 0,
  
"address_type": "string",
  
"name": "string",
  
"fk_id": "string"
}

Responses​

Resource updated successfully

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"street": "string",
  
  
"number": 0,
  
  
"complement": "string",
  
  
"zip_code": 0,
  
  
"neighborhood": "string",
  
  
"city": "string",
  
  
"state": "string",
  
  
"latitude": 0,
  
  
"longitude": 0,
  
  
"address_type": "string",
  
  
"name": "string",
  
  
"fk_id": "string"
  
},
  
"message": "string",
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Product​

Product management endpoints


UploadImage Product​

POST
/products/{id}/image

UploadImage product.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Request Body​

multipart/form-data
object

The file to upload.

Format"binary"

Responses​

Successful operation

application/json
JSON
{
  
"data": {
  
  
"message": "string",
  
  
"fileName": "string"
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​


Score event​

Score event management endpoints


Record score events​

POST
/score-events

Records one or more health score events for an entity and, in the same request,
recalculates and persists its Health Score, returning the detailed result.

Requires an active Health Score configuration compatible with the entity, along with
the events and rules registered in the platform. Without one, the request still returns
200 with an explanatory message and no score is calculated.

All configuration rules are re-evaluated against the entity's entire event history, not
only the events sent in this request. Points are summed per group and capped at the group
ceiling (max_point), then the total is capped at the configuration ceiling (max_score).
The grade is the range with the highest min_value the total score reaches.

There is a single history record per entity, per configuration and per day — subsequent
calls on the same day update the existing record instead of creating a new one. The
resulting score is also replicated to the entity's score field.

Events whose event_key is unknown, or that no rule of the active configuration uses, are
silently ignored without failing the request. The message field reports how many events
were actually processed, which lets the integration detect these cases.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Request Body​

application/json
JSON
{
  
"events": [
  
  
{
  
  
  
"event_key": "string"
  
  
}
  
],
  
"entity_id": 0,
  
"entity": "string"
}

Responses​

Successful operation

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"id_entity": 0,
  
  
"entity": "string",
  
  
"config_id": 0,
  
  
"score": 0,
  
  
"grade": "string",
  
  
"grade_label": "string",
  
  
"observed_at": "2026-08-14T14:04:17",
  
  
"metadata": {
  
  
  
"config": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"description": "string",
  
  
  
  
"category": "string",
  
  
  
  
"status": "string",
  
  
  
  
"version": 0,
  
  
  
  
"max_score": 0,
  
  
  
  
"entity": "string",
  
  
  
  
"groups": [
  
  
  
  
  
{
  
  
  
  
  
  
"id": 0,
  
  
  
  
  
  
"name": "string",
  
  
  
  
  
  
"type": "string",
  
  
  
  
  
  
"color": "string",
  
  
  
  
  
  
"max_point": 0,
  
  
  
  
  
  
"description": "string",
  
  
  
  
  
  
"rules": [
  
  
  
  
  
  
  
{
  
  
  
  
  
  
  
  
"id": 0,
  
  
  
  
  
  
  
  
"name": "string",
  
  
  
  
  
  
  
  
"points": 0,
  
  
  
  
  
  
  
  
"event_id": 0,
  
  
  
  
  
  
  
  
"event_key": "string",
  
  
  
  
  
  
  
  
"value": "string"
  
  
  
  
  
  
  
}
  
  
  
  
  
  
]
  
  
  
  
  
}
  
  
  
  
]
  
  
  
},
  
  
  
"breakdown": [
  
  
  
  
{
  
  
  
  
  
"id": 0,
  
  
  
  
  
"name": "string",
  
  
  
  
  
"score": 0,
  
  
  
  
  
"color": "string",
  
  
  
  
  
"label": "string",
  
  
  
  
  
"max_point": 0,
  
  
  
  
  
"rules": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"rule_id": 0,
  
  
  
  
  
  
  
"points": 0,
  
  
  
  
  
  
  
"reason": "string"
  
  
  
  
  
  
}
  
  
  
  
  
]
  
  
  
  
}
  
  
  
]
  
  
},
  
  
"created_at": "2026-08-14T14:04:17",
  
  
"updated_at": "2026-08-14T14:04:17"
  
},
  
"message": "string",
  
"extraData": {
  
  
"score": 0,
  
  
"color": "string",
  
  
"label": "string",
  
  
"breakdown": [
  
  
  
{
  
  
  
  
"rule_id": 0,
  
  
  
  
"points": 0,
  
  
  
  
"reason": "string"
  
  
  
}
  
  
],
  
  
"groups": [
  
  
  
{
  
  
  
  
"id": 0,
  
  
  
  
"name": "string",
  
  
  
  
"score": 0,
  
  
  
  
"color": "string",
  
  
  
  
"label": "string",
  
  
  
  
"max_point": 0,
  
  
  
  
"rules": [
  
  
  
  
  
{
  
  
  
  
  
  
"rule_id": 0,
  
  
  
  
  
  
"points": 0,
  
  
  
  
  
  
"reason": "string"
  
  
  
  
  
}
  
  
  
  
]
  
  
  
}
  
  
]
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Body

Samples​


User​

User management endpoints


Get a user​

GET
/users/{id}

Returns a single Leads2b user by its internal id.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Path Parameters

id*

ID of the resource

Type
integer
Required

Responses​

Successful operation

application/json
JSON
{
  
"data": {
  
  
"id": 0,
  
  
"name": "string",
  
  
"email": "string",
  
  
"phone": "string",
  
  
"fk_id": "string",
  
  
"active": true,
  
  
"group": {
  
  
  
"id": 0,
  
  
  
"name": "string"
  
  
}
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Search users​

GET
/users

Lists the users of the company with filtering, sorting and pagination.

Authorizations​

BearerAuth
Type
HTTP (bearer)
Example"Bearer ..."

Parameters​

Query Parameters

name
Type
string
email
Type
string
fk_id
Type
string
id_group

ID of the Group

Type
integer
Minimum
1
limit
Type
integer
Minimum
1
Maximum
100
Default
25
page
Type
integer
Minimum
1
Default
1
sort
Type
string
Valid values
"id""name""email""created_at""updated_at""-id""-name""-email""-created_at""-updated_at"
Default
"-id"

Responses​

Successful operation

application/json
JSON
{
  
"data": [
  
  
{
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"email": "string",
  
  
  
"phone": "string",
  
  
  
"fk_id": "string",
  
  
  
"active": true,
  
  
  
"group": {
  
  
  
  
"id": 0,
  
  
  
  
"name": "string"
  
  
  
}
  
  
}
  
],
  
"pagination": {
  
  
"page": 1,
  
  
"limit": 25,
  
  
"total": 100,
  
  
"totalPages": 4,
  
  
"hasNext": true,
  
  
"hasPrev": false,
  
  
"links": {
  
  
  
"self": "/orders?page=1&limit=25",
  
  
  
"first": "/orders?page=1&limit=25",
  
  
  
"last": "/orders?page=4&limit=25",
  
  
  
"next": "/orders?page=2&limit=25",
  
  
  
"prev": "string"
  
  
}
  
},
  
"meta": {
  
  
"timestamp": "2026-08-14T14:04:15",
  
  
"version": "1.0.0"
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​


Powered by VitePress OpenAPI