Saltar al contenido
Almendra
Esc
↑↓navegar↵abrir⌘Jvista previa

List exchange groups

The account’s exchange groups: the ones it created and its edits to the built-in groups of its country’s exchange system (replacesDefaultGroup). Built-in groups the account never changed are not listed.

Requires the library:read permission.

GET/exchange-groups
Autorización
AuthorizationToken Bearer (API Key) · headerobligatorio

Almendra API key, bound to one professional account. Send it as Authorization: Bearer YOUR_API_KEY.

Ámbitos:library:read
Respuestas
200

Exchange groups

exchangeGroupsExchangeGroup[]obligatorio
Mostrar propiedades
Array de ExchangeGroup
_idstringobligatorio
namestringobligatorio
descriptionstring
colorstring
categorystring
replacesDefaultGroupstring

Id of the built-in group this one replaces or hides (e.g. CENAN-01)

hidesDefaultGroupbooleanobligatorio

True when this entry only hides the built-in group replacesDefaultGroup

foodsRecipeIngredient[]obligatorio

Foods in the group and the quantity that makes one exchange

Mostrar propiedades
Array de RecipeIngredient
foodstring

Food ID (left out in other accounts' public recipes)

foodNamestringobligatorio
quantitynumberobligatorio
unitstringobligatorio
401

Missing or invalid API key

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

403

The account behind the API key has no active paid plan, or the key lacks the permission this operation needs

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

429

Rate limit exceeded (600 requests per 60 seconds); retry after Retry-After seconds

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

500

Unexpected server error

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

Pruébalo
Servidor
Autorización
Solicitud
curl -X GET 'https://api.almendra.io/openapi/v1/exchange-groups' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Respuesta
{
  "exchangeGroups": [
    {
      "_id": "string",
      "name": "Cereales sin grasa",
      "description": "string",
      "color": "string",
      "category": "string",
      "replacesDefaultGroup": "string",
      "hidesDefaultGroup": true,
      "foods": [
        {
          "food": "string",
          "foodName": "string",
          "quantity": 0,
          "unit": "string"
        }
      ]
    }
  ]
}

¿No encuentras lo que buscas?

Nuestro equipo responde en menos de 1 día hábil, de lunes a viernes de 9:30 a 18:00 (GMT-5).

Escríbenos

¿Te ha resultado útil esta página?