Skip to content
Light
English

ApiMp Structure

Methods, URL, authentication, headers, bodies, status, pagination, and request limits of ApiMp.

ApiMp follows the REST standard:

  • POST: record creation.
  • PUT: record update.
  • GET: query and listing.

Host for all requests:

https://api.demander.com.br

Endpoint examples:

  • api-mp/v1/clientes (GET and POST)
  • api-mp/v1/clientes/{id} (PUT)

The key is sent in the CompanyToken header.

Configuration is located in Demander Web, under ApiMp Configuration.

  • Sent: mandatory to provide CompanyToken and Content-Type: application/json.
  • Response: depends on the method.
    • GET: Content-Type and pagination headers.
    • POST and PUT: JSON type, record ID, and URL to query it.
  • Sent: validated on POST and PUT. Fields by method and table are listed in the fields article.
  • Response: also varies by method and table; the complete list is in the same article.
  • 200: success.
  • 201: creation completed.
  • 403: inactive company.
  • 412: error in request body.
  • 422: record does not exist.
  • 429: too many requests in a short period.

Applies only to GET. Control is provided by three values in the response header:

  • Record limit: indicates if pagination occurred.
  • Total number of records: how many records were returned in the page (maximum 150).
  • Extra requests: how many pages remain with the parameters used.

The limit applies to all methods, based on the CompanyToken key.

Each company has a request cap. When exceeded, the API responds with HTTP 429:

{
"tempo_ate_permitir_novamente": 120,
"limite_de_requisicoes": 100
}

If the ERP continues sending requests after a 429, the integration may be temporarily blocked:

{
"mensagem": "Integração bloqueada por desrespeitar as políticas de throttling, entre em contato com o suporte.",
"tempo_ate_permitir_novamente": 9999999,
"limite_de_requisicoes": 0
}