API

API endpoints > carriers > get

Get all set up carriers and options belonging to them. This endpoint is mainly used for shop checkouts where a selection of carrier and sendingoptions is displayed.

JSON data structure

No data is expected for this operation.

JSON reply data

  • CarrierArray of objectsCarrier information
    • HasPickupBooleanAlways returnedIndicates if the carrier has pickup points available, only here for backward compatibility.
    • IdInteger numberAlways returnedMinimum value: 1The correct carrier id for the carrier
    • NameStringAlways returnedMinimum length: 3, maximum length: 50The correct name for the carrier
    • MapFieldsArray of objectsAny extra fields for pickup points are listed here, including optional variables etc. If added, the resulting values have to be added to the chosen option as OptionFields entries. The order of the fields does not matter, as long as the Id is filled correct.
      • IdInteger numberAlways returnedMinimum value: 1The correct option id
      • NameStringAlways returnedMinimum length: 3, maximum length: 50The correct name for the option
    • OptionListArray of objectsAll the options for this carrier that are available
      • ClassIdStringAlways returnedMinimum length: 1The class id of this option (see below).
      • IdInteger numberAlways returnedMinimum value: 1The correct option id
      • IsPickupBooleanIf defined and set to true this means: this option is for selecting a pickup point (on a map or list)
      • MapFieldsSelectArray of single valuesIf defined, then this holds a list of id's as defined in MapFields which are to be active when this option is selected.
      • NameStringAlways returnedMinimum length: 3, maximum length: 50The correct name for the option
      • OptionTypeInteger numberAlways returnedMinimum value: 1The type for the option. See explanation for this field below!
      • OptionFieldsArray of objectsOption extra fields list, if any are defined
        • IdInteger numberAlways returnedMinimum value: 1The id
        • MaskStringcan contain a mask for data validity
        • NameStringAlways returnedMinimum length: 3, maximum length: 50The name
        • OptionValuessublistPossible values for the option
          • IdStringAlways returnedMinimum length: 1The id
          • NameStringAlways returnedMinimum length: 3, maximum length: 50The name
      • OptionValuesArray of objectsPossible values for this option. Either this or OptionFields is defined
        • AllowedOptionsArray of single valuesOnly active for OptionType 1: If defined, then there are only certain extra options (of type 0 or 2) allowed when this service level is selected. If not defined then all extra options are allowed.
        • CountryOptionsArray of single valuesOnly active for OptionType 1: If defined, then there are only certain countries where this option would be allowed
        • IdStringAlways returnedMinimum length: 1The id
        • IsPickupBooleanOnly active for OptionType 1: This tells the frontend that when this service level is selected then a map should be shown with pickup points.
        • NameStringAlways returnedMinimum length: 3, maximum length: 50The name
  • ErrorsublistAlways returnedAny error will be reported here, see the error list for error codes and their meaning.
    • IdInteger numberAlways returnedMaximum value: 999The id of the error
    • InfoStringTextual error
  • ErrorListArray of objectsList of errors, to clarify the Error if possible
    • IdInteger numberAlways returnedMaximum value: 999The error id, see the error list
    • TekstStringAlways returnedMaximum length: 255Textual error for detailed information

GET/carriers/
GET/carriers/allowed/
POST/carriers/carrier/:carrierId
PATCH/carriers/carrier/:carrierId