# carrierProfiles query


`carrierProfiles` is a GraphQL query of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Returns a page of the active carrier profiles from the Chameleoon carrier catalogue. Use it to
choose the route an order ships with, for example the `carrier` of
[`createSalesOrder`](/chameleoon-max/mutation/create-sales-order).

- Requires the `order.read` or `integration.read` permission.
- Ordered by carrier code, then by profile, then by a stable hidden tiebreaker.
- `totalCount` counts every active profile in the organisation, whatever page you read.

Pass exactly one of `first` or `last`, from 1 to 250. `first` (with `after`) pages forward;
`last` (with `before`) pages backward. `last` alone returns the last page. Every edge carries
its own cursor.

A page costs 2 + first (or last) × the cost of one node.

## Arguments

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

## Returns

[`CarrierProfileConnection!`](/chameleoon-max/type/carrier-profile-connection): a page of [`CarrierProfile`](/chameleoon-max/type/carrier-profile).

## Example

**Query**

```graphql
query carrierProfiles($first: Int) {
  carrierProfiles(first: $first) {
    edges {
      cursor
    }
    nodes {
      code
      profile
      name
      service
    }
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

**Variables**

```json
{
  "first": 10
}
```

**Response**

```json
{
  "data": {
    "carrierProfiles": {
      "edges": [
        {
          "cursor": "example"
        }
      ],
      "nodes": [
        {
          "code": "example",
          "profile": "example",
          "name": "example",
          "service": "example"
        }
      ],
      "totalCount": 1,
      "pageInfo": {
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "example",
        "endCursor": "example"
      }
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
