Ordini

Crea un ordine

POST
/api/v1/external/orders
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://service.e-manager.io/api/v1/external/orders" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "full_name": "Mario Rossi",      "email": "mario.rossi@example.com",      "phone": "+39 02 1234567"    },    "billing": {      "company": "Rossi S.r.l.",      "address": "Via Roma 1",      "city": "Milano",      "province": "MI",      "zip": "20121",      "country_code": "IT",      "vat_number": "IT12345678901",      "tax_code": "RSSMRA80A01F205X"    },    "shipping": {      "full_name": "Mario Rossi",      "company": "Rossi S.r.l.",      "phone": "+39 02 1234567",      "address": "Via Spedizione 42",      "address2": "Scala B, Int. 3",      "city": "Milano",      "province": "MI",      "zip": "20121",      "country_code": "IT"    },    "items": [      {        "product_id": "550e8400-e29b-41d4-a716-446655440000",        "sku": "PROD-001",        "name": "Maglietta Blu XL",        "quantity": 2,        "price": 29.99      }    ],    "shipping_cost": 5.9,    "insurance": false,    "payment_method": "PREPAID",    "note": "Consegnare solo di mattina",    "warehouse_id": 1  }'
{
  "order": {
    "id": 1042,
    "companyId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "orderNumber": "ORD-2026-001042",
    "status": "pending",
    "totalNetAmount": "49.17",
    "totalVatAmount": "10.82",
    "totalGrossAmount": "59.99",
    "saleShippingCost": "5.90",
    "shippingCostGrossAmount": 5.9,
    "insurance": false,
    "insuranceAmount": "0.0000",
    "buyerOrderNote": "Consegnare solo di mattina",
    "currency": "EUR",
    "parcelNumber": 1,
    "companyCustomersId": 301,
    "companyCustomerAddressId": 512,
    "dateMarketplaceCreation": "2026-04-27T10:30:00.000Z",
    "dateImport": "2026-04-27T10:30:00.000Z"
  },
  "orderItems": [
    {
      "id": 2087,
      "title": "Maglietta Blu XL",
      "sku": "PROD-001",
      "companyProductId": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 2,
      "unitPriceGross": 29.99,
      "unitPriceNet": 24.58,
      "totalAmountNet": 49.17,
      "totalAmountGross": 59.98
    }
  ],
  "customer": {
    "id": 301,
    "fullName": "Mario Rossi",
    "email": "mario.rossi@example.com",
    "phone": "+39 02 1234567",
    "billingCompany": "Rossi S.r.l.",
    "billingAddress": "Via Roma 1",
    "billingCity": "Milano",
    "billingState": "MI",
    "billingZip": "20121",
    "billingCountry": "IT",
    "billingVat": "IT12345678901",
    "billingCodiceFiscale": "RSSMRA80A01F205X",
    "createdAt": "2026-04-27T10:30:00.000Z",
    "updatedAt": "2026-04-27T10:30:00.000Z"
  },
  "customerAddress": {
    "id": 512,
    "fullName": "Mario Rossi",
    "company": "Rossi S.r.l.",
    "phone": "+39 02 1234567",
    "address": "Via Spedizione 42",
    "address2": "Scala B, Int. 3",
    "city": "Milano",
    "state": "MI",
    "zip": "20121",
    "country": "Italy",
    "countryCode": "IT",
    "createdAt": "2026-04-27T10:30:00.000Z",
    "updatedAt": "2026-04-27T10:30:00.000Z"
  },
  "totals": {
    "netAmount": 49.17,
    "vatAmount": 10.82,
    "grossAmount": 59.99
  }
}

Last updated on