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
Key | Datatype | Required | Description |
---|---|---|---|
carrier | string | The carrier you want to filter for, for instance: postnl. You can find available carriers in your Sendcloud account settings. | |
is_active | string | 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. | |
country | string | Filter contracts based on the country of the contract, it should be in the ISO 3166-1 alpha-2 format. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"contracts":[{"id":"\u003clong\u003e","client_id":"\u003cstring\u003e","is_active":"\u003cboolean\u003e","carrier":{"code":"\u003cstring\u003e","name":"\u003cstring\u003e"},"name":"\u003cstring\u003e","country":"\u003cstring\u003e","is_default":"\u003cboolean\u003e"},{"id":"\u003clong\u003e","client_id":"\u003cstring\u003e","is_active":"\u003cboolean\u003e","carrier":{"code":"\u003cstring\u003e","name":"\u003cstring\u003e"},"name":"\u003cstring\u003e","country":"\u003cstring\u003e","is_default":"\u003cboolean\u003e"}],"next":"\u003cstring\u003e","previous":"\u003cstring\u003e"}