Skip to main content

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 string
  • importReport — empty string
  • status — draft (R). Values I or imported are stored as imported (I); any other value is stored as draft (R)
  • operatorJoinsame

Item identity:

  • country must include at least one identifier
  • operator must include either MCC and MNC, or operatorName

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 and importOnlyIfAllValid is true, the whole import is aborted (409). If importOnlyIfAllValid is false, the first row is imported and the rest are rejected
  • off — duplicate country/operator rows are not allowed; all such rows are rejected and the import fails
  • min / 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 importOnlyIfAllValid is true; 409 with request echo and row error / warning fields
  • 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 / A or notactive / 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 operatorJoin is off
  • OP_JOIN=SAME: SAME_OPERATOR_DIFFERENT_PRICE - Different prices for the same operator under operatorJoin same

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

Gate pricelist range imported successfully