Skip to main content
GET
/
contracts
Retrieve a list of contracts
curl --request GET \
  --url https://panel.sendcloud.sc/api/v3/contracts \
  --header 'Authorization: Basic <encoded-value>'
{
  "data": [
    {
      "id": 60,
      "carrier": {
        "code": "lettresuivie",
        "name": "Lettre Suivie"
      },
      "client_id": "sendcloud-1",
      "country": "FR",
      "is_default_per_carrier": true,
      "state": "active",
      "type": "direct"
    },
    {
      "id": 61,
      "carrier": {
        "code": "poste_italiane",
        "name": "Poste Italiane"
      },
      "client_id": "sendcloud-1",
      "country": "IT",
      "is_default_per_carrier": true,
      "state": "active",
      "type": "direct"
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Query Parameters

carrier_code
string

The carrier you want to filter for, for instance: postnl. You can find available carriers in your Sendcloud account settings.

is_active
boolean

Filter contracts based on the status.

client_id
string

Filter direct contracts based on the client id.

name
string

Filter direct contracts based on the contract's name. Will search for a case-sensitive exact match.

country_code
string

Filter contracts based on the country of the contract, it should be in the ISO 3166-1 alpha-2 format.

cursor
string

The cursor query string is used as the pivot value to filter results. If no value is provided, the first page of results will be returned. To get this value, you must encode the offset, reverse and position into a base64 string.

There are 3 possible parameters to encode:

  • o: Offset
  • r: Reverse
  • p: Position

For example, r=1&p=300 encoded as a base64 string would be cj0xJnA9MzAw. The query string would then be cursor=cj0xJnA9MzAw.

Example:

"cj0xJnA9MzAw"

page_size
integer

The size of the page to fetch

Response

OK

Retrieve contracts

data
Contract · object[]
required