Skip to content

Sale Order

Create

Create Sale Order from a logged in user

Set cookie: session_id value what we got from authenticate

POST /api/v1/store/order/create-order

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"order": {
"comment": "Some comment",
"orderLines": [
{
"id": -1,
"productId": 5,
"name": "Coke",
"price": 2.0,
"quantity": 1,
"readonly": false,
"taxRate": 0.19
}
]
}
}

Response:

{
"id": 5,
"name": "TGE23-2400006",
"orderLines": [
{
"id": 6,
"productId": 5,
"categoryId": 6,
"categoryName": "All / Drinks",
"name": "Coke",
"price": 2.0,
"taxRate": 0.19,
"quantity": 1.0
}
],
"date": "2020-01-01 00:00:00",
"amount": 2.0,
"partnerId": 10,
"state": "draft",
"productPricelist": {
"id": 1,
"name": "Default EUR pricelist",
"pricelistVersions": []
},
"invoiceUrl": null
}

Get Order

Get Sale Order from a logged in user by id

Set cookie: session_id value what we got from authenticate

POST /api/v1/store/order/get-order

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"orderId": 5
}

Response:

{
"id": 5,
"name": "TGE23-2400006",
"orderLines": [
{
"id": 6,
"productId": 5,
"categoryId": 6,
"categoryName": "All / Drinks",
"name": "Coke",
"price": 2.0,
"taxRate": 0.19,
"quantity": 1.0
}
],
"date": "2020-01-01 00:00:00",
"amount": 2.0,
"partnerId": 10,
"state": "draft",
"productPricelist": {
"id": 1,
"name": "Default EUR pricelist",
"pricelistVersions": []
},
"invoiceUrl": null
}

My Orders

Return list of logged in partner sale orders

Set cookie: session_id value what we got from authenticate

POST /api/v1/store/order/my-orders

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{}

Response:

[
{
"orderId": 5,
"name": "TGO99-2400005",
"date": "2020-01-01 00:00:00",
"description": [
"Coke"
],
"amount": 2.0,
"partnerId": 11,
"invoiceUrl": null,
"state": "draft"
}
]