Order
Create a new order.
Create a new order
post/rest/api/orders/
Request body
Example request
{
"platformId": 1,
"idExternal": "WWW/341/2023",
"isInvoice": true,
"customerLogin": "user123",
"paymentType": 2,
"originalCurrency": "PLN",
"sendDateMin": "2022-03-07T00:00:00Z",
"sendDateMax": "2022-03-08T20:00:00Z",
"preferences": {
"idUser": "user-12345"
},
"orderItems": [
{
"id": 1,
"idExternal": "359",
"ean": "400638133393",
"sku": "P44/3-T1.2",
"originalName": "Samsung Galaxy S20 Plus Black 128GB 5G",
"originalCode": "PHONE-S20-128GB-B",
"originalPriceWithTax": "2799.99",
"originalPriceWithoutTax": "2799.99",
"media": null,
"quantity": 2,
"tax": "23.00",
"productSet": null,
"status": 1,
"unit": "Szt.",
"type": 1,
"productId": 12345
},
{
"id": 2,
"idExternal": null,
"ean": null,
"sku": "ship-pp",
"originalName": "Wysyłka - Poczta Polska - Pocztex",
"originalCode": null,
"originalPriceWithTax": "10.00",
"originalPriceWithoutTax": "10.00",
"media": null,
"quantity": 1,
"tax": null,
"productSet": null,
"status": 1,
"unit": null,
"type": 2,
"productId": null
}
],
"orderPayments": [
{
"idExternal": "PAY-123456",
"amount": 1259.98,
"paymentDate": "2022-03-08T20:00:00Z",
"type": 1,
"comment": "Komentarz do wpłaty"
}
],
"addressCustomer": {
"name": "Jan Kowalski",
"phone": "+48 500 000 000",
"email": "jan.kowalski@apilo.com",
"streetName": "Testowa",
"streetNumber": "4b/12",
"city": "Kraków",
"zipCode": "31-154",
"country": "PL",
"parcelIdExternal": "KRA32B",
"parcelName": "Paczkomat, ul. Testowa 12 (obok sklepu)",
"companyTaxNumber": "937-271-51-54",
"companyName": "Apilo Sp. z o.o."
},
"addressDelivery": {
"name": "Jan Kowalski",
"phone": "+48 500 000 000",
"email": "jan.kowalski@apilo.com",
"streetName": "Testowa",
"streetNumber": "4b/12",
"city": "Kraków",
"zipCode": "31-154",
"country": "PL",
"parcelIdExternal": "KRA32B",
"parcelName": "Paczkomat, ul. Testowa 12 (obok sklepu)",
"companyTaxNumber": "937-271-51-54",
"companyName": "Apilo Sp. z o.o."
},
"addressInvoice": {
"name": "Jan Kowalski",
"phone": "+48 500 000 000",
"email": "jan.kowalski@apilo.com",
"streetName": "Testowa",
"streetNumber": "4b/12",
"city": "Kraków",
"zipCode": "31-154",
"country": "PL",
"parcelIdExternal": "KRA32B",
"parcelName": "Paczkomat, ul. Testowa 12 (obok sklepu)",
"companyTaxNumber": "937-271-51-54",
"companyName": "Apilo Sp. z o.o."
},
"carrierAccount": 1,
"orderNotes": [
{
"type": 2,
"comment": "I'll ask for delivery next week at the earliest"
}
],
"orderedAt": "2022-06-09T10:59:12+0100",
"status": 3
}Response
Order with the given idExternal already exists
Example response
{
"id": "AA123456789"
}Changes
No recorded changes to this endpoint across all 1 revision of this API.