OfficeGest
Stocks/Prices table for article

Resolve price for an article in a given context

Returns the best matching price rule for the given article, applying classification, payment method and date priority fallback logic.

POST
/stocks/prices-table-for-article
AuthorizationBearer <token>

In: header

article_idstring

Article ID

classification_id?string

Classification code

payment_method_id?string

Payment method code

date?string

Reference date for price lookup (Y-m-d), defaults to today

Formatdate
id_discount_type?string

Discount type ID used as fallback

Response Body

curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/prices-table-for-article" \
  -H "Content-Type: application/json" \
  -d '{
    "article_id": "ART001"
  }'
{
  "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"
  }
}