# RateGroup APIs

A RateGroup is used to automate carrier and service selection during shipment processing. Instead of explicitly passing a carrier and service in every request, you can pass a rateGroupId, and get the desired rate (for example, lowest cost or fastest delivery). <br/>
RateGroups helps with:
- Atomatic rate shopping across multiple carriers
- Shipping decision depends on price, speed, or available services at runtime

**How it works**<br/>
- Create a RateGroup with a list of
  - carrierCode (e.g., USPS, UPS, FedEx)
  - serviceId (e.g., PM, FEDEX_GROUND, NDA) <br/>

- Use the returned rateGroupId in
  - Rate API:  to fetch the best available rate
  - Create Shipment API:  to generate a shipment using the selected service

- When a rateGroupId is provided in a request, carrier and service selection is handled internally based on the configured items.
- Evaluation of carrier-service combinations is dynamic and may vary per request depending on shipment attributes such as origin, destination, and parcel details.
- Only RateGroups with status active are considered for processing.
- RateGroups are country-specific, and only applicable shipments are evaluated.

> Read [How to Create RateGroup](/docs/rategroup-management/rategroup-guide).


Version: 1.0.0

## Servers

```
https://api-dev.sendpro360.pitneycloud.com/shipping
```

```
https://api-qa.sendpro360.pitneycloud.com/shipping
```

Sandbox Server
```
https://api-sandbox.sendpro360.pitneybowes.com/shipping
```

Production Server (uses live data)
```
https://api.sendpro360.pitneybowes.com/shipping
```

Sandbox Server for Canada
```
https://api-ppd.shipping360.pitneybowes.com/ca/shipping
```

Production Server for Canada
```
https://api.shipping360.pitneybowes.com/ca/shipping
```

Admin Sandbox Server for global region
```
https://admin-ppd.spo.pitneybowes.com/shipping
```

Admin Production Server for global region
```
https://admin-global.shipping360.pitneybowes.com/shipping
```

Client Sandbox Server for global region
```
https://app-global-ppd.spo.pitneybowes.com/shipping
```

Client Production Server for global region
```
https://app-global.shipping360.pitneybowes.com/shipping
```

## Security

### basicAuth

Type: http
Scheme: basic

### bearerAuth

Type: http
Scheme: bearer

## Download OpenAPI description

 - [RateGroup APIs](https://docs.sendpro360.pitneycloud.com/_bundle/openapi/rategroup.yaml)

## RateGroup

 - [POST /api/v1/rategroups](https://docs.sendpro360.pitneycloud.com/openapi/rategroup/rategroup/createrategroup.md): Use this API to create a RateGroup that groups carriers and their services for automated rate shopping. A RateGroup allows the system to dynamically select the cheapest or fastest delivery option acro
 - [GET /api/v1/rategroups](https://docs.sendpro360.pitneycloud.com/openapi/rategroup/rategroup/getallrategroups.md): This operation retrieves a list of all RateGroups with metadata such as the RateGroup ID, display name, origin country, status (active/inactive), audience type, included carriers and services, archiv
 - [GET /api/v1/rategroups/{rateGroupId}](https://docs.sendpro360.pitneycloud.com/openapi/rategroup/rategroup/getrategroup.md): This operation retrieves a RateGroups using the provided RateGroup ID with metadata such as the RateGroup ID, display name, origin country, status (active/inactive), audience type, included carriers a
 - [PUT /api/v1/rategroups/{rateGroupId}](https://docs.sendpro360.pitneycloud.com/openapi/rategroup/rategroup/updaterategroup.md): This operation updates the details of an existing RateGroup identified by its RateGroup ID. You can modify attributes such as the display name, status (active/inactive), audience type (Enterprise, Loc
 - [DELETE /api/v1/rategroups/{rateGroupId}](https://docs.sendpro360.pitneycloud.com/openapi/rategroup/rategroup/deleterategroup.md): This operations deletes the specified RateGroup.
