# Get Special Services

The operation fetches Special Services for a given carrier, service, origin country, and the destination country. If query parameters are not provided, it will default to `USPS` as carrier, `US` as both origin, and destination country and will show for all service and parcel types

Endpoint: GET /api/v1/specialServices
Version: 1.0.0
Security: bearerAuth

## Query parameters:

  - `service` (string)
    The serviceId. It can be referred from response of `Get Services` API

  - `parcel` (string)
    The parcel Id, a unique identifier named to individual package. It can be referred from response of `Get Parcel Types` API

  - `carrier` (string)
    The CarrierID, a unique identifier given to an individual carrier. It can be referred from response of `Get Carriers` API

  - `originCountryCode` (string)
    The Source Country. The two-character ISO country code for the country where the Shipment originates.

  - `destinationCountryCode` (string)
    The Destination Country for the Shipment. The two-character ISO country code for the country where the shipment is to be delivered.

## Header parameters:

  - `X-PB-Developer-Partner-Id` (string)
    This is the Developer Partner ID. When the developer is the only partner, this field is not required.

## Response 200 fields (application/json):

  - `services` (array)

  - `services.serviceId` (string)
    The unique identifier given to the carrier specific service.
    Example: LIB

  - `services.brandedName` (string)
    The branded name of the service
    Example: Library Mail®

  - `services.parcelTypeRules` (array)
    It displays special services for specific parcel type

  - `services.parcelTypeRules.brandedName` (string)
    The branded name of Parcel Type
    Example: Package

  - `services.parcelTypeRules.parcelType` (string)
    Parcel Type is required for creating a shipment while rating a parcel, which varies as per Carrier selection. Here, it reflects as per the defined ParcelType Rules. ParcelType have categories like Package, Envelopes, Paks, Boxes, Tube, etc.
    Example: PKG

  - `services.parcelTypeRules.trackable` (string)
    Whether this parcel type is trackable. Valid Values are: TRACKABLE, NON_TRACKABLE, REQUIRES_TRACKABLE_SPECIAL_SERVICE
    Example: REQUIRES_TRACKABLE_SPECIAL_SERVICE

  - `services.parcelTypeRules.suggestedTrackableSpecialService` (string)
    If trackable is set to REQUIRES_TRACKABLE_SPECIAL_SERVICE, this is a free or low-cost special service that allows the shipper to track the shipment.
    Example: DelCon

  - `services.parcelTypeRules.specialServiceRules` (array)
    It displays all the available special services, their details and prerequisites and/or incompatible details with other special services
    Example: [{"brandedName":"Collect on Delivery","categoryId":"COD","categoryName":"Collect on Delivery","incompatibleSpecialServices":["CODRD","Ins","InsRD","SigRD"],"inputParameterRules":[{"brandedName":"COD A…

  - `services.parcelTypeRules.specialServiceRules.specialserviceId` (string)
    It display the unique id of the special service
    Example: COD

  - `services.parcelTypeRules.specialServiceRules.brandedName` (string)
    The brand name of the special service.
    Example: Collect on Delivery

  - `services.parcelTypeRules.specialServiceRules.categoryId` (string)
    The unique identifier associated with the special service based on the category.
    Example: COD

  - `services.parcelTypeRules.specialServiceRules.categoryName` (string)
    The special service is categorized with some name and rules, It indicates the category name of the special service.
    Example: Collect on Delivery

  - `services.parcelTypeRules.specialServiceRules.incompatibleSpecialServices` (array)
    Indicates non-compatible special services with this special service
    Example: ["CODRD","Ins","InsRD","SigRD"]

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules` (array)
    The rules defined for input parameters for this special service
    Example: [{"brandedName":"COD Amount","maxValue":1000,"minValue":1,"name":"INPUT_VALUE","required":true}]

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules.brandedName` (string)
    The branded name of the input parameter for the special service
    Example: COD Amount

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules.maxValue` (number)
    Max value for the input.
    Example: 1000

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules.minValue` (number)
    Minimum value for the input.
    Example: 1

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules.name` (string)
    Name of the input parameters required for the special service
    Example: INPUT_VALUE

  - `services.parcelTypeRules.specialServiceRules.inputParameterRules.required` (boolean)
    If all the input parameters are correct will display `true` value, else it will return `false'.
    Example: true

  - `services.parcelTypeRules.specialServiceRules.prerequisiteRules` (array)
    It displays other pre-requisite special services for this special service
    Example: [{"specialserviceId":"COD"},{"specialserviceId":"CODRD"}]

  - `services.parcelTypeRules.specialServiceRules.prerequisiteRules.specialserviceId` (string)
    Example: COD

  - `services.parcelTypeRules.specialServiceRules.trackable` (boolean)
    If this special service is trackable or not
    Example: true

## Response 400 fields (application/json):

  - `errorCode` (string)
    Error code(s) that appear due to HTTP  400- Invalid or Bad Request, e.g., validation-error.
    Example: validation_error

  - `errorDescription` (string)
    The HTTP 400 Bad Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
    Example: string

  - `additionalCode` (string)
    A unique identifier for the error, for example 1101055, 0100008, or 1021126.

  - `additionalInfo` (string)
    This is an additional information about the error. This error 'Invalid Request' might appear due to invalid dimension, weight, or serviceID, or if the information is missing.

  - `additionalParameters` (array)

## Response 401 fields (application/json):

  - `message` (string, required)
    This is HTTP 401 Unauthorized response status code, which indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

## Response 500 fields (application/json):

  - `message` (string, required)
    This is HTTP 500 Internal Server Error response status code, which indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

