Skip to main content

Order Endpoints

This API provides endpoints to obtain, add, modify or delete information related to the Order entity. This has information about the client, the agent, the product and its corresponding season.

Common Order Characteristics​

  1. Unique identifier: The Order entity has a unique identifier that is used to distinguish it from other orders and reference it easily. It also has an idRemote field, which refers to the id that may be stored in the client's ERP database.

  2. Order Data: Typically, a order has associated information such as company, client, season, discount and other details.

  3. Company: It is necessary to store basic information about the company that receives the order.

  4. Customer: There must be a client associated with each order. The client is a business partner with the role of Client.

  5. Agent: Additionally, an order must have an agent associated with it. This is the representative of the company that made the sale. An agent is a business partner with the role of Representant.

  6. Season: Information is stored about the season in which the order was placed.

  7. Discount: The Order entity stores information about the discounts applied to it.

  8. Lines: Each line of the order corresponds to the product or service requested. The lines store information about the quantity and price of each product or service delivered. The lines have a status that specifies whether it is in stock, whether it is shipped or not, or whether it has been deleted.

Importance in the API​

Our API provides specific endpoints to manage and manipulate orders within the system. These endpoints enable operations such as creation, updating, retrieval, and deletion of order information in a structured and secure manner.

Endpoints​

GET/Order/getOrder​

Retrieve a paginated list with existing orders in the database.

Description​

Allows you to obtain a list of orders organized according to pagination parameters. It also includes information such as the company, the client, the agent, the season, the corresponding discount and additional details.

Parameters​
NameDescriptionTypeDefault Value
idOrder IdString optionalid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"reference": "string",
"numOrder": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string"
},
"client": {
"id": "string",
"idRemote": "string",
"contactName": "string"
},
"agent": "string",
"status": "string",
"season": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"shippingAddress": "string",
"billingAddress": "string",
"discount": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"sequence": 0,
"discount": 0,
"amountDiscount": 0,
"isLine": true
}
],
"lines": [
{
"id": "string",
"idRemote": "string",
"lineStatus": "string",
"discount": [
{
"id": "string",
"idRemote": "string",
"discount": 0,
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"observations": "string",
"deliveryDate": "string",
"cancellationDate": "string",
"lineAmount": 0,
"quantity": 0,
"quantityServed": 0,
"quantityFromStock": 0,
"lineDetail": [
{
"id": "string",
"idRemote": "string",
"product": "string",
"quantity": 0,
"price": 0,
"retailPrice": 0
}
]
}
],
"dateOrder": "string",
"dateModified": "string",
"dateDelivery": "string",
"observation": "string",
"grossAmount": 0,
"baseAmount": 0,
"shippingAmount": 0,
"taxAmount": 0,
"taxrecAmount": 0,
"totalAmount": 0,
"totalQuantity": 0,
"quantityServed": 0,
"quantityPending": 0,
"shipper": "string",
"origin": "string",
"isSale": true,
"active": true,
"createdBy": {
"id": "string",
"idRemote": "string",
"username": "string"
},
"updatedBy": {
"id": "string",
"idRemote": "string",
"username": "string"
},
"createdAt": "string",
"updatedAt": "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>Γ§
<reference>string</reference>
<numOrder>string</numOrder>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
</company>
<client>
<id>string</id>
<idRemote>string</idRemote>
<contactName>string</contactName>
</client>
<agent>string</agent>
<status>string</status>
<season>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</season>
<shippingAddress>string</shippingAddress>
<billingAddress>string</billingAddress>
<discount>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<sequence>0</sequence>
<discount>0</discount>
<amountDiscount>0</amountDiscount>
<isLine>true</isLine>
<isHeader>true</isHeader>
</discount>
<lines>
<id>string</id>
<idRemote>string</idRemote>
<lineStatus>string</lineStatus>
<discount>
<item>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<sequence>0</sequence>
<discount>0</discount>
<amountDiscount>0</amountDiscount>
</item>
</discount>
<observations>string</observations>
<deliveryDate>string</deliveryDate>
<cancellationDate>string</cancellationDate>
<lineAmount>0</lineAmount>
<quantity>0</quantity>
<quantityServed>0</quantityServed>
<quantityFromStock>0</quantityFromStock>
<lineDetail>
<id>string</id>
<idRemote>string</idRemote>
<product>string</product>
<quantity>0</quantity>
<price>0</price>
<retailPrice>0</retailPrice>
</lineDetail>
</lines>
<dateOrder>string</dateOrder>
<dateModified>string</dateModified>
<dateDelivery>string</dateDelivery>
<observation>string</observation>
<grossAmount>0</grossAmount>
<baseAmount>0</baseAmount>
<shippingAmount>0</shippingAmount>
<taxAmount>0</taxAmount>
<taxrecAmount>0</taxrecAmount>
<totalAmount>0</totalAmount>
<totalQuantity>0</totalQuantity>
<quantityServed>0</quantityServed>
<quantityPending>0</quantityPending>
<shipper>string</shipper>
<origin>string</origin>
<isSale>true</isSale>
<active>true</active>
<createdBy>
<id>string</id>
<idRemote>string</idRemote>
<username>string</username>
</createdBy>
<updatedBy>
<id>string</id>
<idRemote>string</idRemote>
<username>string</username>
</updatedBy>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

GET/Order/getOrder/Status​

Retrieves a paginated list with the identifiers and description of the available statuses for the orders.

Description​

Local and remote identifiers are displayed in a paginated manner along with the status description. Pagination can be modified through these parameters:

Parameters​
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
  {
"data": [
{
"id": "string",
"value": 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>
<value>true</value>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

GET/Order/getOrder/Line/Status​

Retrieve a paginated list with the identifiers and descriptions of the available statuses for order lines.

Description​

Local and remote identifiers are displayed in a paginated manner along with the status description. Pagination can be modified using these parameters:

Parameters​
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
  {
"data": [
{
"id": "string",
"value": 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>
<value>true</value>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

GET/Order/updatedFrom​

Retrieve a paginated list of existing orders since the specified date in the parameters.

Description​

Allows obtaining a list of existing orders from the specified date. If no orders exist, an empty list is returned.

Parameters​
NameDescriptionTypeDefault Value
dateLast updated dateString required1999-01-01 01:00:00
statusOrder Status[String]--
pagePage numberInteger1
pageSizeItems per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"reference": "string",
"numOrder": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string"
},
"client": {
"id": "string",
"idRemote": "string",
"contactName": "string"
},
"agent": "string",
"status": "string",
"season": {
"id": "string",
"idRemote": "string",
"description": "string"
},
"shippingAddress": "string",
"billingAddress": "string",
"discount": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"sequence": 0,
"discount": 0,
"amountDiscount": 0,
"isLine": true
}
],
"lines": [
{
"id": "string",
"idRemote": "string",
"lineStatus": "string",
"discount": [
{
"id": "string",
"idRemote": "string",
"discountType": {
"id": "string",
"name": "string",
"code": "string",
"description": "string"
},
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"observations": "string",
"deliveryDate": "string",
"cancellationDate": "string",
"lineAmount": 0,
"quantity": 0,
"quantityServed": 0,
"quantityFromStock": 0,
"lineDetail": [
{
"id": "string",
"idRemote": "string",
"product": "string",
"quantity": 0,
"price": 0,
"retailPrice": 0
}
]
}
],
"dateOrder": "string",
"dateModified": "string",
"dateDelivery": "string",
"observation": "string",
"grossAmount": 0,
"baseAmount": 0,
"shippingAmount": 0,
"taxAmount": 0,
"taxrecAmount": 0,
"totalAmount": 0,
"totalQuantity": 0,
"quantityServed": 0,
"quantityPending": 0,
"shipper": "string",
"origin": "string",
"isSale": true,
"active": true,
"createdBy": {
"id": "string",
"idRemote": "string",
"username": "string"
},
"updatedBy": {
"id": "string",
"idRemote": "string",
"username": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}

TODO NEXT DAY

XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<reference>string</reference>
<numOrder>string</numOrder>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
</company>
<client>
<id>string</id>
<idRemote>string</idRemote>
<contactName>string</contactName>
</client>
<agent>string</agent>
<status>string</status>
<season>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
</season>
<shippingAddress>string</shippingAddress>
<billingAddress>string</billingAddress>
<discount>
<item>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<sequence>0</sequence>
<discount>0</discount>
<amountDiscount>0</amountDiscount>
<isLine>true</isLine>
</item>
</discount>
<lines>
<item>
<id>string</id>
<idRemote>string</idRemote>
<lineStatus>string</lineStatus>
<discount>
<item>
<id>string</id>
<idRemote>string</idRemote>
<discountType>
<id>string</id>
<name>string</name>
<code>string</code>
<description>string</description>
</discountType>
<sequence>0</sequence>
<discount>0</discount>
<amountDiscount>0</amountDiscount>
</item>
</discount>
<observations>string</observations>
<deliveryDate>string</deliveryDate>
<cancellationDate>string</cancellationDate>
<lineAmount>0</lineAmount>
<quantity>0</quantity>
<quantityServed>0</quantityServed>
<quantityFromStock>0</quantityFromStock>
<lineDetail>
<item>
<id>string</id>
<idRemote>string</idRemote>
<product>string</product>
<quantity>0</quantity>
<price>0</price>
<retailPrice>0</retailPrice>
</item>
</lineDetail>
</item>
</lines>
<dateOrder>string</dateOrder>
<dateModified>string</dateModified>
<dateDelivery>string</dateDelivery>
<observation>string</observation>
<grossAmount>0</grossAmount>
<baseAmount>0</baseAmount>
<shippingAmount>0</shippingAmount>
<taxAmount>0</taxAmount>
<taxrecAmount>0</taxrecAmount>
<totalAmount>0</totalAmount>
<totalQuantity>0</totalQuantity>
<quantityServed>0</quantityServed>
<quantityPending>0</quantityPending>
<shipper>string</shipper>
<origin>string</origin>
<isSale>true</isSale>
<active>true</active>
<createdBy>
<id>string</id>
<idRemote>string</idRemote>
<username>string</username>
</createdBy>
<updatedBy>
<id>string</id>
<idRemote>string</idRemote>
<username>string</username>
</updatedBy>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

POST/Order/create​

Order Registration in the API: Using the POST Method​

Currently, our POST method in the API exclusively handles JSON format. To effectively register orders, it is crucial to follow a process that ensures data integrity and proper system functionality.

Registration Process:​
  1. Creation of Company: Before registering an order, it is necessary to ensure that there is an associated Company. This is important since users can have multiple companies. πŸ‘‰Register Company🌱

  2. Creation of Client: It is necessary to ensure that there is an associated Client and that it has the Client role. Additionally, this customer must belong to the same company that placed the order. If an incorrect client is attached, the response will return an error. πŸ‘‰Register Client🌱

  3. Creation of Agent: It is crucial to ensure that the Business Partner you assign to the order in the agentId parameter has the Representant role and belongs to the same Company as the one placing the order. If an incorrect agent is attached, the response will return an error. πŸ‘‰Register Agent🌱

  4. Creation of Season: Before registering an order, it is necessary to ensure that the B2B is used for fashion, in this case a Season entity is created. If it is not used for fashion it is not necessary to have the Season. πŸ‘‰Register Season🌱

  5. Shipping and Billing Addresses In order to register a new order in the system, you must enter both the shipping and billing addresses. These addresses must be registered as addresses for the ordering Business Partner. These addresses must be registered in the system with the appropriate role. For example, for the shipping address, it must be a Location with the shippingAddress field set to true. You can configure locations when creating a new Business Partner or via the Locations endpoints. πŸ‘‰ Creating a new Business Partner 🌱 πŸ‘‰ Endpoints for Locations 🌱

  6. Order Status: The reference to the Order Status must exist in the system. To view the available statuses for Orders you can use the endpoint described at the beginning of this documentation.

  7. Discount: Discounts are not a mandatory parameter. To enter an order into the system without discounts, simply attach an empty array. You can set an id for each discount. This id corresponds to the remote id that you want to assign. The system will automatically create a local id for each new discount you create in this way.

  8. Lines: An order is made up of lines. Each line includes information about the product or service that is sent to the client. For this reason, the Product associated with each line through the productId parameter must exist in the system. Additionally, each line is related to a State (lineStatusId). Through the creation of lines you can assign an id to each one, which corresponds to the idRemote. The system will create a local id automatically. In the same way, discounts can be associated with each Product line. The process of creating discounts for each line is similar to the previous process of creating discounts for an order.

Required parameters:​
NameDescriptionType
idRemoteIdentifier of the new OrderString
referenceReference of the new OrderString
numOrderOrder's NumberString
companyIdIdentifier of the Company to which the new Order belongs.String
clientIdIdentifier of the Business Partner with the role of client to whom the new Order is addressedString
agentIdIdentifier of the Business Partner with the role of agent who has made the new OrderString
statusIdIdentifier of the status of the OrderString
seasonIdIdentifier of the seasonString
dateOrderDate on which the new Order was createdString
grossAmountGross Amount of the new OrderDecimal
baseAmountBase Amount of the new OrderDecimal
shippingAmountShipping cost amount for the new OrderDecimal
taxAmountTax amount for the new OrderDecimal
totalAmountTotal amount for the new OrderDecimal
totalQuantityTotal quantity of products in the new OrderDecimal
quantityServedDelivered quantity for the new OrderDecimal
quantityPendingPending delivery quantity for the new OrderDecimal
shippingAddressIdLocation ID for shipping the new OrderString
billingAddressIdLocation ID for billing the new OrderString

If you want to add Discounts to the Order, you must take into account that all parameters are mandatory.


Mandatory parameters for Lines:​

If you are going to add an Order with Lines, you must take into account that the following parameters are mandatory:

NameDescriptionType
idRemoteIdentifier for the Order LineString
lineStatusIdIdentifier of the Status of the Order LineString
lineDetailList of Line DetailsArray
Mandatory parameters for Line Detail:​

Within the Line Detail, the following parameters are mandatory:

NameDescriptionType
idRemoteIdentifier for the Order Line DetailString
productIdId of the Product being sold in the OrderString
Full body of the request:​
[
{
"idRemote": "string",
"reference": "string",
"numOrder": "string",
"companyId": "string",
"clientId": "string",
"agentId": "string",
"statusId": "string",
"seasonId": "string",
"shippingAddressId": "string",
"billingAddressId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"lines": [
{
"idRemote": "string",
"lineStatusId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"observations": "string",
"deliveryDate": "string",
"cancellationDate": "string",
"lineAmount": 0,
"quantity": 0,
"quantityServed": 0,
"quantityFromStock": 0,
"lineDetail": [
{
"idRemote": "string",
"productId": "string",
"quantity": 0,
"price": 0,
"retailPrice": 0
}
]
}
],
"dateOrder": "string",
"dateModified": "string",
"dateDelivery": "string",
"observation": "string",
"grossAmount": 0,
"baseAmount": 0,
"shippingAmount": 0,
"taxAmount": 0,
"taxrecAmount": 0,
"totalAmount": 0,
"totalQuantity": 0,
"quantityServed": 0,
"quantityPending": 0,
"shipper": "string",
"isSale": true
}
]

It is possible to add multiple Orders 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. You can check the status of the submitted request through the url attached in the response. A successfully sent message to the consumer should look like this:

{
"code": 201,
"message": "Order 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 order data format, a required parameter is missing"
}

πŸ‘‰Try it out🌱

PUT/Order/update/{id}​

Updating an existing order.

Description​

This endpoint allows customers to update data for an existing Order in the database using the id parameter of an existing Order in the system. Through this endpoint you can update data for the Order, or for its Lines and Discounts. Also, this endpoint allows you to add new lines or discounts to an existing Order.

If you want to update an existing Discount or Line in the Order being updated, simply append its identifier to the idRemote attribute in the request body. The system will create a new Discount or Line if it does not find this attribute in the request body.

Parameters​
NameDescriptionType
idOrder identifierString required

You don't need to include the entire JSON structure, just include the attributes you want to modify.


Request body​

The request body to update all attributes of an Order should look like this:

{
"idRemote": "string",
"numOrder": "string",
"companyId": "string",
"clientId": "string",
"agentId": "string",
"statusId": "string",
"seasonId": "string",
"shippingAddressId": "string",
"billingAddressId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"lines": [
{
"idRemote": "string",
"lineStatusId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"observations": "string",
"deliveryDate": "string",
"cancellationDate": "string",
"lineAmount": 0,
"quantity": 0,
"quantityServed": 0,
"quantityFromStock": 0,
"lineDetail": [
{
"idRemote": "string",
"productId": "string",
"quantity": 0,
"price": 0,
"retailPrice": 0
}
]
}
],
"dateOrder": "string",
"dateModified": "string",
"dateDelivery": "string",
"observation": "string",
"grossAmount": 0,
"baseAmount": 0,
"shippingAmount": 0,
"taxAmount": 0,
"taxrecAmount": 0,
"totalAmount": 0,
"totalQuantity": 0,
"quantityServed": 0,
"quantityPending": 0,
"shipper": "string",
"isSale": true
}

πŸ‘‰Try it out🌱

PUT/Order/update/updateAsMessage​

Updating an existing order.

Description​

This endpoint allows customers to update data for an existing Order in the database using the id parameter of an existing Order in the system. Through this endpoint you can update data for the Order, or for its Lines and Discounts. Also, this endpoint allows you to add new lines or discounts to an existing Order.

If you want to update an existing Discount or Line in the Order being updated, simply append its identifier to the idRemote attribute in the request body. The system will create a new Discount or Line if it does not find this attribute in the request body.


You don't need to include the entire JSON structure, just include the attributes you want to modify.


Request body​

The request body to update all attributes of an Order should look like this:

[
{
"orderId": "string",
"idRemote": "string",
"numOrder": "string",
"companyId": "string",
"clientId": "string",
"agentId": "string",
"statusId": "string",
"seasonId": "string",
"shippingAddressId": "string",
"billingAddressId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"lines": [
{
"idRemote": "string",
"lineStatusId": "string",
"discount": [
{
"idRemote": "string",
"discountTypeId": "string",
"sequence": 0,
"discount": 0,
"amountDiscount": 0
}
],
"observations": "string",
"deliveryDate": "string",
"cancellationDate": "string",
"lineAmount": 0,
"quantity": 0,
"quantityServed": 0,
"quantityFromStock": 0,
"lineDetail": [
{
"idRemote": "string",
"productId": "string",
"quantity": 0,
"price": 0,
"retailPrice": 0
}
]
}
],
"dateOrder": "string",
"dateModified": "string",
"dateDelivery": "string",
"observation": "string",
"grossAmount": 0,
"baseAmount": 0,
"shippingAmount": 0,
"taxAmount": 0,
"taxrecAmount": 0,
"totalAmount": 0,
"totalQuantity": 0,
"quantityServed": 0,
"quantityPending": 0,
"shipper": "string",
"isSale": true
}
]

πŸ‘‰Try it out🌱

DELETEOrder/delete/{id}​

Delete an existing order.

Description​

The DELETE method delete an order from the database using the provided identifier in the parameters. This id field can be either the identifier generated by the B2B database or the idRemote you provide when registering orders. Deleting an Order removes all associated lines, discounts, and due dates. Once deleted, the Order is recorded in Deleted History.


⚠️An Order that has lines associated with a Delivery Note cannot be deleted.

Parameters​
NameDescriptionType
idOrder identifierString required

πŸ‘‰Try it out🌱

DELETEOrder/deleteLines/{orderId}​

Delete an existing order.

Description​

The DELETE method delete lines of an order from the database using the provided identifier in the parameters. This orderId field can be either the identifier generated by the B2B database or the idRemote you provide when registering orders. Deleting the removes all associated lines, discounts, and due dates. Once deleted, the Lines are recorded in Deleted History.


⚠️An Order that has lines associated with a Delivery Note cannot be deleted.

Parameters​
NameDescriptionType
orderIdOrder identifierString required

πŸ‘‰Try it out🌱

Possible Response Errors​

ErrorResponse StatusResponse 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 into the database.500{"code": 500,"error": "Invalid connection name, you cannot insert in default"}
This error indicates that 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 indicates that the entity could not be found.404{"code": 404,"error": "No entity found for Order with $id."}
This error occurs when you try to insert an entity 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"}