Imports a new gate pricelist range and items
POST/sms/buying/{plid}/ranges-import
Creates a new gate pricelist date range under the given supplier pricelist from an
import payload: range metadata, optional operatorJoin strategy (off, min, max,
same), and item rows keyed by country and operator.
The new range uses the system unlimited end date. The call fails if an active or
imported range already exists with the same startDate.
Query importOnlyIfAllValid (default true): when true, any row-level validation or
join conflict aborts the import. The API responds with 409 and a JSON body equal to
the request, with error / warning fields set on items where applicable. When false,
valid rows are imported (at least one is required) and rejected rows are omitted.
Query importNotZeroPricesOnly (default false): when true, zero-price rows are skipped.
Defaults when omitted:
comment— empty stringimportReport— empty stringstatus— draft (R). ValuesIorimportedare stored as imported (I); any other value is stored as draft (R)operatorJoin—same
Item identity:
countrymust include at least one identifieroperatormust include either MCC and MNC, oroperatorName
operatorJoin — how duplicate country/operator rows are resolved:
same— keep the first row with a matching price; remaining same-price duplicates are rejected with a warning. If prices differ andimportOnlyIfAllValidistrue, the whole import is aborted (409). IfimportOnlyIfAllValidisfalse, the first row is imported and the rest are rejectedoff— duplicate country/operator rows are not allowed; all such rows are rejected and the import failsmin/max— keep the row with the minimum or maximum price; remaining rows in the group are rejected with a warning
Privilege:
- bulk-supplier-pricelist.manage
Auditlog Event: gate.pricelist.range.import
Errors:
- NOT_AUTHORIZED - Not authorized
- GATE_PRICE_LIST_NOT_FOUND - Gate pricelist not found
- MULTIPLE_SUPPLIER_IMPORT_RANGES - An active or imported range already exists for the same start date
- IMPORT_NOT_ALL_ROWS_VALID - Strict import aborted when
importOnlyIfAllValidis true; 409 with request echo and rowerror/warningfields - GATE_PRICE_IMPORT_NO_VALID_ITEMS - No rows left after filters; 409 with request echo
- BASE_CURRENCY_NOT_FOUND - Instance base currency not found
- BULK_RATES_SETTINGS_NOT_FOUND - Bulk rates settings not found for instance
- INT_APP_ERROR - Unexpected internal error / missing instance context
Validation Error Items (range / header):
- IMPORT_START_DATE_IS_MISSING - Start date of the pricelist range must be provided
- IMPORT_END_DATE_WRONG_USAGE - Start date is after the system unlimited end (invalid range)
- IMPORT_CURRENCY_IS_WRONG - Header currency id not found
Row validation — items[].error (also used in 409 echo when strict import aborts):
- COUNTRY_IS_MISSING - No country keys on the row
- COUNTRY_IS_AMBIGIOUS - Conflicting country identifiers
- COUNTRY_NOT_VALID - Resolved country id is not a valid country
- OPERATOR_IS_AMBIGIOUS - Operator fields conflict with “all networks” / MCC+MNC rules
- COUNTRY_NOT_FOUND_MCC - MCC could not be resolved for the country context
- OPERATOR_MCC_IS_MISSING - MCC required when MNC is set for a specific country
- OPERATOR_MNC_IS_MISSING - MNC required when MCC is set for a specific country
- OPER_MNC_IS_WRONG - MCC+MNC does not match a known operator for the country
- OPERATOR_IS_MISSING - Operator not specified where required
- OPERATOR_NOT_ALLNETWORKS - Invalid operator combination for “all countries” or “all networks” rows
- ITEM_IMPORT_STATUS_IS_MISSING - Row status empty
- ITEM_STATUS_IS_WRONG - Row status is not
active/Aornotactive/N - ITEM_PRICE_IS_MISSING - Price is missing
- ITEM_IMPORT_PRICE_IS_WRONG - Negative price
- OP_JOIN=OFF:SAME_OPERATOR_IN_MULTIPLE_ITEMS - Duplicate country/operator when
operatorJoinisoff - OP_JOIN=SAME: SAME_OPERATOR_DIFFERENT_PRICE - Different prices for the same operator under
operatorJoinsame
Row warnings — items[].warning (non-fatal; may appear in 409 echo or on accepted rows):
- ZERO_PRICE_REJECTED - Zero-price row (warning; row may be skipped depending on
importNotZeroPricesOnly) - JOIN_MIN_PRICE_SELECTED - Row selected as min price in join group
- JOIN_MIN_PRICE_REJECTED - Row not selected under min join
- JOIN_MAX_PRICE_SELECTED - Row selected as max price in join group
- JOIN_MAX_PRICE_REJECTED - Row not selected under max join
- JOIN_SAME_PRICE_SELECTED - Row selected under same-join resolution
- JOIN_SAME_PRICE_REJECTED - Row not selected under same join
Request
Responses
- 200
- 409
- default
Gate pricelist range imported successfully
Import rejected (importOnlyIfAllValid / no valid items) or business conflict
(for example a duplicate start date). For strict validation failure, the body
mirrors the request with per-item error / warning codes instead of the
standard Error envelope.
Unexpected error