Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

API.Routes.DatRead

Mestre-Tramador edited this page Aug 29, 2022 · 1 revision

Read Dat GET

/dat/:id

Read a stored .dat file content.

URL Path

Path Value Description
:id number The numeric ID of the .dat file being read.

Response

200

{
  "sellers": [
    {
      "cpf": "525.446.820-35",
      "name": "Bianca Baum",
      "wage": 3200.0
    }
  ],
  "customers": [
    {
      "cnpj": "37.174.119/0001-90",
      "name": "Gilberto Tavares",
      "branch": "Agronomia"
    }
  ],
  "sales": [
    {
      "id": 831,
      "items": [
        {
          "id": 99432,
          "quantity": 12,
          "price": 5.90
        }
      ],
      "seller": "Bianca Baum"
    }
  ]
}

Following the model of a Dat file, it describes the lists of sellers, customer and sales on the stored file.

404

{
  "error": "File not found"
}

If there is no file with the given ID, then this error is returned.

Clone this wiki locally