Skip to content
platform

API reference · Contracts · Head Office Management

List Branch Contracts

Method
GET
Route
/pricing/contract/list/store/:partnerId
Base URL
https://ws.autorei.net
Path parameters
:partnerId
Query parameters in the example
limit=20 offset=0
Token
Requires Bearer token
Test in Postman

Opens this request in the public API documentation, the official source of the reference.

Description

Allows a head office account to list the price contracts of one of its branches, from newest to oldest, with pagination.

The response is identical to that of the store's own listing — the difference is the branch being queried, which comes in the route and is validated against your head office's links.

Path Parameters

Parameter Type Required Description
partnerId integer Yes Id of the branch that owns the contract. It must be linked to the token's head office.

Query Parameters

Parameter Type Required Description
limit integer No Contracts per page. Default 20, cap 50. Above the cap, the cap applies.
offset integer No How many contracts to skip. Default 0.

Response · 200

Array of contracts, each in the same format as the creation response.

Field Description
id Contract id.
name Contract name.
active Active contract.
partner.id Id of the partner that owns the contract.
partner.name · partner.document Name and document of the partner that owns the contract.
allCustomers · allPartners Contract coverage.
priority Contract priority.
dateStart · dateEnd Validity period, in UTC.
dateCreated · lastUpdated Creation and last change, in UTC.
priceBeforeAfter Previous price enabled.
contractType BASIC or COUNTDOWN.
isDiscountBlockedByAttendant Discount blocked by the attendant.
priceContractPartners Ids of the branches where the contract applies.
priceContractStates States (UF) where the contract applies.
priceContractCustomerGroups Ids of the contract's customer groups.
priceContractStores Ids of the stores where the contract applies.

Errors

Code When
400 The route's partnerId is not numeric: {"error":"Invalid target partner ID"}.
400 The store has no contracts at all on the requested page: {"error":"priceContract.list.empty"}.
401 Token missing, malformed or expired: {"error":"Authentication required for this route"}.
403 The branch is not linked to your head office: {"error":"Access denied: Invalid partnership"}. Unlike 400, here the payload is right — what is missing is the link.

Example request

curl --request GET 'https://ws.autorei.net/pricing/contract/list/store/:partnerId?limit=20&offset=0' \
  --header 'Authorization: Bearer {{access_token}}'

Example responses

200Success — one contract

[
  {
    "id": 4610002,
    "name": "Tabela Atacado Filial 2026",
    "active": true,
    "partner": {
      "id": 5057,
      "name": "Loja Exemplo - Filial Campinas",
      "document": "30.424.972/0002-55"
    },
    "allCustomers": false,
    "allPartners": false,
    "priority": 10,
    "dateStart": "2026-09-01T00:00:00Z",
    "dateEnd": "2027-06-30T00:00:00Z",
    "dateCreated": "2026-09-04T13:22:32.687284Z",
    "lastUpdated": "2026-09-04T13:22:32.687284Z",
    "priceBeforeAfter": null,
    "contractType": "BASIC",
    "isDiscountBlockedByAttendant": false,
    "priceContractPartners": [],
    "priceContractStates": [
      "SP",
      "MG"
    ],
    "priceContractCustomerGroups": [
      4610101
    ],
    "priceContractStores": []
  }
]

Used in

Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.