---
title: "Get Primary Trade For Provider"
method: POST
path: "/trades/GetPrimaryTrade"
tags: ["Trades"]
---

# Get Primary Trade For Provider

`POST /trades/GetPrimaryTrade`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/trades/GetPrimaryTrade`
- 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/trades/GetPrimaryTrade/post.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `subscriberId` integer, required
- `tradeName` string
- `tradeId` integer

## Response `200`

Indicates that the request succeeded.

- ServiceChannelServicesMessagingTradeTradeWithPrimaryTrade
  - `PrimaryTrade` string
  - `Id` integer: Numeric identifier of the trade.
  - `Name` string: Trade name.
  - `SubscriberId` integer: Unique subscriber ID.

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters. <br/>Error codes: <br/> 503 - tradeName and tradeId cannot be both empty or null and less than 1 and null respectively. <br/> 401 - Invalid subscriber id
- `401`: Indicates that the requested resource requires authentication.
- `404`: The requested resource does not exist on the server. <br/>Error codes: <br/> 5010 - Trade is not found
- `500`: Indicates that a generic error has occurred on the server.

---

[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)
