GET v1/contracts

Retorna os contratos ativos do anunciante.

Requires Authorization

To perform authorization, you must submit the authentication credentials using the HTTP Basic authorization header.
The authorization header is constructed as follows:

  1. The username and password are combined into a string "user:password"
  2. The resulting literal string is then encoded in Base64
  3. The authorization method followed by the word "Basic" is then placed before the coded sequence.
For example, if the user is 'Aladdin' and the password is 'open-sesame' then the header should be:
Authorization: Basic QWxhZGRpbjpvcGVuLXNlc2FtZQ==

Response Codes

  • OK (200)
  • BadRequest (400)
  • Unauthorized (401)
  • Forbidden (403)
  • NotFound (404)

Response Information

Resource Description

ContractResponse array Returns a list of the advertiser's contracts.

NameDescriptionTypeAdditional Information
IdAdvertiser contract identification codeinteger
StartsAtContract start date (Format DD/MM/YYYY)string
ExpiresAtContract expiration date (Format DD/MM/YYYY)string
StatusCurrent contract statusstring
HasAdsPlanIndicates whether the contract has an Ad Planboolean
HasWebsitePlanIndicates whether the contract has a private website plan (EmEstoque.com.br)boolean

Response Formats

application/json, text/json

Notes:

  • In Json format, the parameter names follow the camelCase pattern, that is, they always start with lowercase letters.
[
  {
    "id": 1,
    "startsAt": "19/05/2024",
    "expiresAt": "19/06/2024",
    "status": "Active",
    "hasAdsPlan": true,
    "hasWebsitePlan": false
  },
  {
    "id": 1,
    "startsAt": "19/05/2024",
    "expiresAt": "19/06/2024",
    "status": "Active",
    "hasAdsPlan": true,
    "hasWebsitePlan": false
  }
]

text/html

[{"id":1,"startsAt":"19/05/2024","expiresAt":"19/06/2024","status":"Active","hasAdsPlan":true,"hasWebsitePlan":false},{"id":1,"startsAt":"19/05/2024","expiresAt":"19/06/2024","status":"Active","hasAdsPlan":true,"hasWebsitePlan":false}]

application/xml, text/xml

<ArrayOfContractResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ContractResponse>
    <Id>1</Id>
    <StartsAt>19/05/2024</StartsAt>
    <ExpiresAt>19/06/2024</ExpiresAt>
    <Status>Active</Status>
    <HasAdsPlan>true</HasAdsPlan>
    <HasWebsitePlan>false</HasWebsitePlan>
  </ContractResponse>
  <ContractResponse>
    <Id>1</Id>
    <StartsAt>19/05/2024</StartsAt>
    <ExpiresAt>19/06/2024</ExpiresAt>
    <Status>Active</Status>
    <HasAdsPlan>true</HasAdsPlan>
    <HasWebsitePlan>false</HasWebsitePlan>
  </ContractResponse>
</ArrayOfContractResponse>