Stocks/Prices table
Create or update a price table rule
Creates a new price/discount rule for an article. If a rule already exists for the same article, classification and payment method combination, it is updated instead.
AuthorizationBearer <token>
In: header
article_idstring
Article ID
pricenumber
Price value (>= 0)
Range
0 <= valueclassification_id?string
Classification code
payment_method_id?string
Payment method code
description?string
Rule description
discount_perc?number
Discount percentage (0-100)
start_date?string
Start date (Y-m-d)
Format
dateend_date?string
End date (Y-m-d)
Format
dateResponse Body
curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/prices-table" \
-H "Content-Type: application/json" \
-d '{
"article_id": "ART001",
"price": 25.5
}'{
"data": {
"id": 0,
"type": "string",
"description": "string",
"article_id": "string",
"classification_id": "string",
"payment_method_id": "string",
"price": 0,
"discount_perc": 0,
"discount_perc2": 0,
"discount_perc3": 0,
"discount_perc4": 0,
"discount_perc5": 0,
"discount_type": "string",
"label": "string",
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": "string"
}
}{
"data": {
"id": 0,
"type": "string",
"description": "string",
"article_id": "string",
"classification_id": "string",
"payment_method_id": "string",
"price": 0,
"discount_perc": 0,
"discount_perc2": 0,
"discount_perc3": 0,
"discount_perc4": 0,
"discount_perc5": 0,
"discount_type": "string",
"label": "string",
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": "string"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}