---
title: "Returns provider active contracts by providerId, locationId and trade"
method: GET
path: "/contracts"
tags: ["Contracts"]
---

# Returns provider active contracts by providerId, locationId and trade

`GET /contracts`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/contracts`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/contracts/get.ts> (a function with typed inputs; its response is checked against the schema)

Available only for Subscriber user.

## Query parameters

- `locationId` string
- `locationDbId` integer
- `providerId` integer
- `trade` string
- `tradeId` integer

## Response `200`

The requested contracts are in the response.

- ServiceChannelServicesMessagingContractsGetContractsResponse
  - `Contracts` ServiceChannelServicesMessagingContractsContract[]
    - `Id` integer: Numeric identifier of the provider’s assignment.
    - `Rank` integer: Provider’s rank for the trade and location combo in the subscriber’s system.
    - `Contractor` ServiceChannelServicesMessagingProvidersProvider
      - `Phone` string
      - `FullName` string: Full Name
      - `Address1` string: Address1
      - `Address2` string: Adress2
      - `City` string: City
      - `State` string: State
      - `Zip` string: Zip
      - `Country` string: Country
      - `MainContact` string: Main Contact
      - `DateCreated` string, date-time: Date Created
      - `LastUserDate` string: Last User Date
      - `SuperUser` string: SuperUser
      - `WebSite` string: WebSite
      - `Email` string: Email
      - `TaxId` string: Tax Id
      - `Trade` string: Trade
      - `ProcessingEmail` string: Processing Email
      - `FaxNumber` string: Fax Number
      - `SuiteFloor` string: Suite Floor
      - `MailInfo` string: Mail Info
      - `ImageFile` string: Image File
      - `ReturnMail` string: Return Mail
      - `MailFrequency` integer: Mail Frequency
      - `FormId` integer: Form Id
      - `Pager` string: Pager
      - `NightRequest` integer: NightRequest
      - `ShortFormatEmail` string: Short Format Email
      - `LastTrainingDate` string, date-time: Last Training Date
      - `LastTrainingDateStr` string: Last Training Date as a string
      - `IsInternal` boolean: Is Internal
      - `IsOnOffShoreFeatureEnabled` boolean: Is OnOffShoreFeature Enabled
      - `Id` integer: Id
      - `Name` string: Name
      - `DoNotDispatch` boolean: DoNotDispatch enabled?
    - `Client` ServiceChannelServicesMessagingSubscribersSubscriber
      - `Id` integer
      - `ShortName` string
      - `Email` string
      - `Users` ServiceChannelServicesMessagingUsersUser[]
        - `Id` integer: Unique user identifier.
        - `SubscriberId` integer: Unique subscriber ID.
        - `UserName` string: Username of the user.<br /> • For subscriber users, the username appears as **User Id** on the "General Info" tab of the user profile page.<br /> • For provider users, the username is listed as **UserID** under "Access" on the "General" tab of the user profile page.
        - `FullName` string: Full name of the user.<br /> • For subscriber users, the full name appears as **User Name** on the "General Info" tab of the user profile page.<br /> • For provider users, you can see their first and last name under "Basic" on the "General" tab of the user profile page.
        - `Email` string: User’s email address.
        - `PsmEmail` string: Email address through which a user can reset their password.
        - `Disabled` boolean: Defines if a user is deactivated.
        - `IsLocked` boolean: Defines if a user is locked.
        - `Roles` string[]: Secondary roles assigned to a subscriber user that determine their permissions and level of access to various Service Automation modules.
        - `Permissions` string[]: Permissions assigned to a subscriber user that determine whether they have full or read-only access to various Service Automation modules.
        - `UserType` 'Corporate' | 'Dashboard' | 'ServiceChannel': Subscriber user type defining their level of access to ServiceChannel:<br /> • `Corporate` — a user can work in Service Automation.<br /> • `Dashboard` — a user can only access the dashboard assigned to them.<br />`0` is returned for provider users.
        - `Dashboard` ServiceChannelServicesMessagingUsersDashboardInfo: Dashboard details object.
          - `Id` integer: Unique dashboard identifier.
          - `Name` string: Dashboard name.
          - `RedirectToDashboard` boolean: Defines whether a subscriber user is redirected to a dashboard once they log in.
        - `Access` ServiceChannelServicesMessagingUsersAccessOptions: Object listing locations, districts, regions, and trades a subscriber user has access to. Learn more about [granting access based on locations, districts, and regions](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/585107276/Location+District+Region+Access+Tab) in ServiceChannel University.
          - `Locations` string[]: Locations a user has access to.
          - `Districts` string[]: Districts a user has access to.
          - `Regions` string[]: Regions a user has access to.
          - `Trades` string[]: Trades a user is permitted to work with.
        - `Limits` ServiceChannelServicesMessagingUsersLimitOptions: Object for NTE, proposal, and invoice limits set for a subscriber user.
          - `NteLimit` ServiceChannelServicesMessagingUsersLimit: Object for limit details set for a subscriber user.
            - `Amount` number, double: Limit amount.
            - `CurrencyId` integer: Identifier of the currency the limit is set in.
          - `ProposalLimit` ServiceChannelServicesMessagingUsersLimit: Object for limit details set for a subscriber user.
            - `Amount` number, double: Limit amount.
            - `CurrencyId` integer: Identifier of the currency the limit is set in.
          - `InvoiceLimit` ServiceChannelServicesMessagingUsersLimit: Object for limit details set for a subscriber user.
            - `Amount` number, double: Limit amount.
            - `CurrencyId` integer: Identifier of the currency the limit is set in.
        - `FeedRole` string
        - `MliUserInfo` ServiceChannelServicesMessagingUsersMliUserInfo
          - `Id` integer
          - `MliLevel` string
          - `MliLocations` integer[]
        - `MlpUserInfo` ServiceChannelServicesMessagingUsersMlpUserInfo
          - `Id` integer
          - `MlpLevel` string
          - `MlpLocations` integer[]
      - `PrimaryCurrency` ServiceChannelServicesMessagingCurrenciesCurrency
        - `Id` integer
        - `AlphabeticalCode` string
        - `DecimalCount` integer
        - `Entity` string
        - `CurrencyName` string
        - `NumericCode` string
        - `Rate` number, double
      - `IsOutsourcedWorkOn` boolean
      - `Name` string, required: Required Name Name - name of the subscriber
      - `Address1` string: Optional
      - `Address2` string: Optional
      - `Country` string: Optional
      - `State` string: Optional
      - `City` string: Optional
      - `Zip` string: Optional
      - `Phone` string: Optional
      - `Fax` string: Optional
      - `ContactName` string: Optional
      - `TimeFormat` string
      - `DateFormat` string
      - `DecimalSeparator` string
    - `Trade` ServiceChannelServicesMessagingTradeTrade: Trade object.
      - `Id` integer: Numeric identifier of the trade.
      - `Name` string: Trade name.
      - `SubscriberId` integer: Unique subscriber ID.
    - `Location` ServiceChannelServicesMessagingLocationLocation: General location details object.
      - `Id` integer: Unique location identifier.
      - `SubscriberId` integer: Unique subscriber identifier.
      - `SubscriberName` string
      - `StoreId` string: Alphanumeric identifier of the store in the client's system. Assigned by and unique per subscriber.
      - `Name` string: Location name.
      - `ShortName` string: Shortened location name.
      - `Latitude` number, double: Global position. Latitude.
      - `Longitude` number, double: Global position. Longitude.
      - `Distance` number, double: Distance from GPS coordinate to this location
      - `Radius` number, double: GPS radius for the location.
      - `LocationTypeId` integer: Numeric identifier of the location type.
      - `Address1` string: Additional location address.
      - `Address2` string: Main location address.
      - `City` string: Location city.
      - `State` string: State where the location is situated.
      - `StateId` integer: Numeric identifier of the location’s state.
      - `Region` string: Part of the country where the location is situated.
      - `District` string: Abbreviation of the town or country area where the location is situated.
      - `Zip` string: Location ZIP or postal code.
      - `Country` string: Abbreviation of the country name where the location is situated.
      - `CountryId` integer: Numeric identifier of the country of the location.
      - `ClosedDate` string, date-time: Last day when the location is open for business.
      - `OpenDate` string, date-time: First day when the location is open for business.
      - `Status` string: Status of the location. Possible values: *open*, *closed*.
      - `Email` string: Email the location can be contacted at.
      - `FaxNumber` string: Fax number the location can be contacted at.
      - `Phone` string: Contact phone number of the location.
      - `Contact` string: Name of the main person to contact at the location.
      - `HasInventory` boolean: Indicates whether it’s an inventory location or not. Possible values: *true*, *false*.
      - `SquareValue` number, double: Square value of the facility.
      - `SquareMeasure` string: Unit or system of units for measuring location area.
      - `TimeZoneInfoId` integer: Numeric identifier of the location time zone.
      - `TimeZoneShortDescription` string: Location time zone abbreviation.
      - `TimeZoneMsName` string: Location time zone Microsoft Name. e.g "Eastern Standard Time"
      - `TimeZoneIanaName` string: Location time zone Iana Name. e.g. "America/New_York"
      - `TypeLabel` string: [Inventory location type](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/1209106525/Creating+Inventory+Locations?preview=%2F1209106525%2F1205830388%2FSupply-House-Type.png). Possible values: *Location*, *Warehouse*, *Supply House*, *Truck*.
      - `Supplier` string: Supplier’s location name.
      - `CountyId` integer: County numeric identifier.
      - `Notes` ServiceChannelServicesMessagingLocationNoteLocationNote[]
        - `Id` integer: Location note numeric identifier.
        - `HeaderId` integer: Unique location note header identifier.
        - `Value` string: Location note content.
        - `Header` string: Name of the note.
      - `TimeShiftToEST` integer
      - `AddressTypeId` integer: Address format pattern Id
      - `FormattedAddress` string
      - `LocationFormattedAddressTail` string
      - `IsInternational` boolean
      - `Address` string
    - `Category` ServiceChannelApiModelEntitiesCategory
      - `Name` string
      - `HasDependency` boolean
      - `PrimaryCategory` ServiceChannelApiModelEntitiesPrimaryCategory
        - `Id` integer
        - `Name` string
        - `SubscriberId` integer
        - `UserId` integer
      - `Id` integer
      - `SubscriberId` integer
      - `UserId` integer

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 503 — Bad Request; locationId or locationDbId should be provided 503 — Location not found 503 — Trade not found 503 — Provider not found 503 — User does not have Location access to perform this operation
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `403`: The request is not allowed. <br/>Error codes: 100 — Only for subscribers usage
- `500`: The server was unable to complete the request due to an internal error.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
