← HomeFleetPay / API

Import services and documents in batch

Parameters, data structure and responses from the versioned contract.

POST/servicos/import
importarServicosEmLoteSandbox Base: https://api.fleetpay.site/v1

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

Receives a JSON batch of services/documents for asynchronous processing in the authenticated company's operational rail.

Authentication

Required Scope
operacao — Operations
Module
Disbursements & Receipts
Target Profiles
Transport Manager · Dedicated Fleet Contractor · Fleet Carrier
Schemes
OAuth2 client_credentials (POST /oauth/token) or API Key via Authorization: Bearer / X-Api-Key
[
  {
    "oauth2": []
  },
  {
    "chaveApi": []
  }
]
Availability depends on the environment, enabled scopes and provider. This reference does not execute requests or collect credentials.

Parameters

No parameters declared for this operation.

Request Body

Required

List of service items for batch creation.

application/json

shipper_cnpjstring | nullOptional

Shipper CNPJ when applicable.

itemsarrayRequired

Batch service items.

Responses

202 HTTP Response

Batch received for asynchronous processing.

application/json

data—Optional
metaobject | nullOptional
additionalPropertiestrue
ambientestringOptional
"homologacao" · "producao"
401 HTTP Response

Missing, invalid or cross-environment credential.

403 HTTP Response

Dashboard scope not enabled or resource outside company scope.

422 HTTP Response

Batch structural validation error.

Complete Operation Definition
{
  "tags": [
    "Parcelas"
  ],
  "operationId": "importarServicosEmLote",
  "summary": "Importar serviços e documentos em lote",
  "description": "Recebe lote JSON de serviços/documentos para processamento assíncrono no trilho operacional da company autenticada.",
  "requestBody": {
    "required": true,
    "description": "Lista de itens de serviço para criação em lote.",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "items"
          ],
          "properties": {
            "shipper_cnpj": {
              "type": [
                "string",
                "null"
              ],
              "description": "CNPJ do embarcador quando aplicável."
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              },
              "description": "Itens de serviço do lote."
            }
          }
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Lote recebido para processamento assíncrono.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "data": {
                "anyOf": [
                  {
                    "type": "object",
                    "additionalProperties": true
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                ]
              },
              "meta": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true
              },
              "ambiente": {
                "type": "string",
                "enum": [
                  "homologacao",
                  "producao"
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "description": "Credencial ausente, inválida ou de outro ambiente."
    },
    "403": {
      "description": "Escopo do painel não habilitado ou recurso fora do escopo da company."
    },
    "422": {
      "description": "Falha de validação estrutural do lote."
    }
  },
  "x-fleetpay-scope": "operacao",
  "x-fleetpay-module": "repasses-comprovantes",
  "x-fleetpay-profiles": [
    "gestor",
    "agregado_empresarial",
    "transportador_frotista"
  ],
  "method": "POST",
  "path": "/servicos/import",
  "parameters": []
}