getInventoryPromotionsList
Returns account-level catalog promotion definitions in priority order with pagination.
Input parameters
| page | int | (optional) Results page number (100 promotions per page, numbered from 1) |
Output data
The method returns the data in JSON format.
| status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
| page | int | The one-based page number returned. |
| promotions | array | Complete promotion definitions in priority order. |
| | - promotion_id | int | Promotion identifier. |
| | - position | int | Priority order. Lower values are applied first. |
| | - name | varchar(100) | Promotion name. |
| | - is_enabled | bool | Whether the promotion is enabled. |
| | - products_filter_type | int | 1 - all products with a price in the source price group, 2 - tags, 3 - categories, 4 - explicit product-price list. |
| | - products_filter_data | array | Filter data for the selected products_filter_type. Type 1: empty array. Types 2-3: integer ID arrays. Type 4: object with type (same value as csv_identifier) and a product_prices map. |
| | - is_include_subcategories | bool | Whether category descendants are included. True only when products_filter_type = 3 and the option is enabled. |
| | - source_price_group_id | int | Source price group identifier. 0 when products_filter_type = 4. |
| | - target_price_group_id | int | Target price group. |
| | - duration_type | int | 0 for unlimited or 1 for a bounded range. |
| | - date_start | int | Start timestamp. 0 when duration_type = 0. |
| | - date_end | int | End timestamp. 0 when duration_type = 0. |
| | - price_multiplier | float | Numeric source-price multiplier. 1 when products_filter_type = 4. |
| | - price_addition | float | Numeric source-price addition. 0 when products_filter_type = 4. |
| | - price_round | int | Price rounding after the multiplier and addition: 0 - without rounding, 1 - round up to the full amount, 2 - round down to the full amount, 3 - round up to .99, 4 - round down to .99, 5 - round up to the nearest 0.09, 6 - round down to the nearest 0.09, 7 - round up and down with an accuracy of 0.09, 8 - round to the nearest 0.10, 9 - round units to closest 5. Ignored when products_filter_type = 4 (stored and returned as 0). |
| | - csv_identifier | varchar(10) | Identifier type used as keys in products_filter_data.product_prices: id or sku. Returned only when products_filter_type = 4. |
| | - date_added | int | Creation timestamp. |
| | - date_updated | int | Last definition update timestamp. |
| | - date_last_calculated | int | Last active-promotion processing-pass timestamp. |
Sample
Input data:Output data:
A sample request in PHP: