A valid request URL is required to generate request examples{
"id": "po-1001",
"supplierId": "nike-fr",
"shopId": "store-rivoli",
"status": "open",
"lines": [
{
"skuId": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"orderedQuantity": 24,
"receivedQuantity": 0,
"unitCostCents": 4500
}
]
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Create a purchase order (commande fournisseur / bon de commande)
Opens a new purchase order (bon de commande) for a supplier (fournisseur) + shop with the ordered per-SKU quantities and their unit cost in cents. The order starts open with every line unreceived. The supplier is validated. 404s for an unknown supplier; 409s when the order id already exists.
A valid request URL is required to generate request examples{
"id": "po-1001",
"supplierId": "nike-fr",
"shopId": "store-rivoli",
"status": "open",
"lines": [
{
"skuId": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"orderedQuantity": 24,
"receivedQuantity": 0,
"unitCostCents": 4500
}
]
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Body
Caller-supplied unique order id (409 if it already exists).
1Supplier (fournisseur) the order is placed with.
1Store (magasin) the goods are ordered for.
1The ordered lines (commande fournisseur); at least one.
1Show child attributes
Show child attributes
Response
The created purchase order (status open).

