post https://{environment}.neomode.com.br/cp/management/commerce/orders/external
Creates a new order in the system using an external reference from a sales channel.
Headers
| Name | Required | Description |
|---|---|---|
Content-Type | Yes | Must be application/json. |
Authorization | Yes | Bearer token for authentication. |
Request Body
Root Fields
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Yes | Client identifier in the platform. |
Channel | string | Yes | Identifies the pre-configured order pipeline by the onboarding team. |
ExternalId | string | Yes | Unique and immutable order code in the sales channel. |
Seller | object | Yes | Store identification. Either Cnpj or PointSaleId must be provided. |
Buyer | object | Yes | Customer billing information. |
DeliveryAddress | object | Conditional | Required when IsDelivery = true. Shipping address for the order. |
Items | array | Yes | List of items in the order. |
IsDelivery | boolean | Yes | true for delivery, false for in-store pickup. |
Freight | object | Yes | Freight details for shipping and display. |
PaymentInfo | object | Yes | Payment details and method. |
Seller Object
| Field | Type | Required | Description |
|---|---|---|---|
Cnpj | string | Yes | Store CNPJ. |
PointSaleId | string | Optional | Store point-of-sale identifier. |
Buyer Object
| Field | Type | Required | Description |
|---|---|---|---|
Cpf | string | Yes | Customer CPF. |
Email | string | Yes | Customer email address. |
FullName | string | Yes | Customer full name. |
PhoneNumber | string | Yes | Customer phone number. |
Address | object | Yes | Billing address details. |
Address Object:
| Field | Type | Required | Description |
|---|---|---|---|
ZipCode | string | Yes | Postal code. |
Street | string | Yes | Street name. |
Number | string | Yes | Street number. |
Neighborhood | string | Yes | Neighborhood name. |
City | string | Yes | City name. |
State | string | Yes | State abbreviation (e.g., SP). |
Items Array
Each item must contain:
| Field | Type | Required | Description |
|---|---|---|---|
SkuCode | string | Yes | SKU identifier. |
ProductCode | string | Yes | Group identifier for the SKU. |
Quantity | integer | Yes | Quantity purchased. |
UnitPrice | number | Yes | Price per unit without discount. |
DiscountPrice | number | Yes | Discount amount applied. |
Freight Object
| Field | Type | Required | Description |
|---|---|---|---|
Amount | number | Yes | Freight cost. |
DeliveryTime | integer | Yes | Delivery time in days. |
Reference | string | Yes | Carrier identifier for integrations. |
Description | string | Yes | Display name for the carrier (shown to operator). |
PaymentInfo - Object from PaymentList Array
Payment method depends on PaymentMethod.Type:
| Type | Method | Additional Fields Required |
|---|---|---|
7 | Payment Link | None |
1 | Credit Card | Brand, AcquirerMessage, AcquirerApprovalCode, QuantityInstallments |
6 | PIX | AcquirerMessage, AcquirerApprovalCode |
Common Fields:
| Field | Type | Required | Description |
|---|---|---|---|
Amount | number | Yes | Payment amount. |
PaymentStatus | integer | Optional | Payment status code. |
QuantityInstallments | integer | Conditional | Required for installment payments. |
AcquirerMessage | string | Conditional | Message from the acquirer. |
AcquirerApprovalCode | string | Conditional | Approval code from the acquirer. |
PaymentMethod Object:
| Field | Type | Required | Description |
|---|---|---|---|
Type | integer | Yes | Payment type identifier. |
Brand | string | Conditional | Card brand when Type = 1. |
Info | string | Optional | Additional payment information. |
Modality | string | Optional | Payment modality code. |
Example Request
{
"ClientId": "qaapp",
"Channel": "ecommerce",
"ExternalId": "NEOMODE-1",
"Seller": { "Cnpj": "04109169000135" },
"Buyer": {
"Cpf": "55570403906",
"Email": "[email protected]",
"FullName": "Implantacao Neomode",
"PhoneNumber": "41999999999",
"Address": {
"ZipCode": "04321130",
"Street": "Rua Farjalla Koraicho",
"Number": "654",
"Neighborhood": "Vila Parque Jabaquara",
"City": "São Paulo",
"State": "SP"
}
},
"DeliveryAddress": {
"ZipCode": "04321130",
"Street": "Rua Farjalla Koraicho",
"Number": "654",
"Neighborhood": "Vila Parque Jabaquara",
"City": "São Paulo",
"State": "SP"
},
"Items": [
{
"SkuCode": "1",
"ProductCode": "1",
"Quantity": 1,
"UnitPrice": 19.9,
"DiscountPrice": 10
}
],
"IsDelivery": true,
"Freight": {
"Amount": 1.1,
"DeliveryTime": 1,
"Reference": "SEDEX",
"Description": "SEDEX",
"CalculationKey": null
},
"PaymentList": [ {
"Amount": 21,
"PaymentMethod": {
"Type": 7
}
}]
}
Response
201 Created
Order successfully created.
400 Bad Request
Validation errors or invalid parameters. May include a detail or errors field.
401 Unauthorized
Invalid or missing authentication token.
500 Internal Server Error
Unexpected server error.
