Retrieve a list of contracts

GET {{baseUrl}}/contracts?carrier=<string>&is_active=<boolean>&client_id=<string>&name=<string>&country=<string>

This endpoint will retrieve information about all of the available contracts you have in your Sendcloud account. It will also return the contract_id of your contracts, which you can use to retrieve information about a specific contract.

Request Params

KeyDatatypeRequiredDescription
carrierstringThe carrier you want to filter for, for instance: postnl. You can find available carriers in your Sendcloud account settings.
is_activestringFilter contracts based on the status.
client_idstringFilter direct contracts based on the client id.
namestringFilter direct contracts based on the contract's name.
countrystringFilter contracts based on the country of the contract, it should be in the ISO 3166-1 alpha-2 format.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;contracts&quot;:[{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;client_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;is_active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;carrier&quot;:{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;},&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;country&quot;:&quot;\u003cstring\u003e&quot;,&quot;is_default&quot;:&quot;\u003cboolean\u003e&quot;},{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;client_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;is_active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;carrier&quot;:{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;},&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;country&quot;:&quot;\u003cstring\u003e&quot;,&quot;is_default&quot;:&quot;\u003cboolean\u003e&quot;}],&quot;next&quot;:&quot;\u003cstring\u003e&quot;,&quot;previous&quot;:&quot;\u003cstring\u003e&quot;}