Providers

GET
https://api.prezo.es/public/v1/providers

The business's provider catalogue, the same it sees in Prezo. name is the name the business gave it; legalName and taxId, its legal name and tax id. The business's own data (name, address, client code) wins over the general one: a restaurant token sees its restaurant's, a group token the group's. Archived providers come with isArchived: true, so old documents still find theirs, and the central kitchen with isInternal: true. Use it to learn the providerId of the filters.

参数

查询参数
page
integer可选

Page, from 1.

perPage
integer可选

Items per page: 100 by default, up to 500.

请求示例

import os

import requests

response = requests.get(
    "https://api.prezo.es/public/v1/providers",
    headers={
        "Authorization": f"Bearer {os.environ['PREZO_API_KEY']}",
        "Accept": "application/json",
    },
)

print(response.json())

响应

Successful response.

{
  "data": [
    {
      "id": 731,
      "name": "Frutas Pepe",
      "legalName": "Distribuciones Pérez SL",
      "taxId": "B11223344",
      "address": {
        "street": "Calle Huerta 3",
        "additionalInfo": null,
        "city": "Valencia",
        "province": "Valencia",
        "postalCode": "46001",
        "country": "España"
      },
      "email": "pedidos@distribucionesperez.es",
      "phone": "600000000",
      "clientCode": "CLI-42",
      "isArchived": false,
      "isInternal": false
    }
  ],
  "meta": {
    "currentPage": 1,
    "perPage": 100,
    "total": 1,
    "lastPage": 1
  },
  "links": {
    "first": "https://api.prezo.es/public/v1/...?page=1",
    "prev": null,
    "next": null,
    "last": "https://api.prezo.es/public/v1/...?page=1"
  }
}