Menu

Referência da API · Envios

Etiquetas

deliveries · labels · 4 operações

GET/v1/deliveries/labels

List delivery labels

deliveries.labels.list

LeituraIdempotenteDesde 2026-11-01

Lists the organization's delivery labels in the order the screen shows them (order), paginated by cursor (limit 50 by default, up to 200): id, name, hex color, and who created it (created_by_id with created_by_name). Put their ids in label_ids of deliveries.deliveries.create or update, and filter deliveries.deliveries.list by label_id. Requires view access to Deliveries.

Escopo
deliveries:read
Permissão
Ver o módulo
Tool do MCP
deliveries_labels_listNa superfície completa; na compacta, mb_execute_operation com id: "deliveries.labels.list".

Custo declarado: até 202 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

limitintegerqueryopcional

How many labels per page (default 50, at most 200).

Padrão: 50

cursorstringqueryopcional

The next_cursor of the previous page, to get the next one; omit it for the first page.

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/deliveries/labels" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/deliveries/labels" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/deliveries/labels

Create a delivery label

deliveries.labels.create

EscritaDesde 2026-11-01

Creates a delivery label with a name (up to 60 characters) and a hex color (#RRGGBB), placed last in the order. Returns the new label_id and the label. Requires edit access to Deliveries.

Escopo
deliveries:write
Permissão
Editar no módulo
Tool do MCP
deliveries_labels_createNa superfície completa; na compacta, mb_execute_operation com id: "deliveries.labels.create".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

namestringcorpoobrigatório

Label name (1–60 characters).

colorstringcorpoobrigatório

Hex color, e.g. #3b82f6.

Resposta

label_idstring

The new label id.

labelobject

The label as saved.

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/deliveries/labels" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "color": "COLOR"
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/deliveries/labels" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "color": "COLOR"
}'
PATCH/v1/deliveries/labels/{label_id}

Update a delivery label

deliveries.labels.update

EscritaIdempotenteDesde 2026-11-01

Renames, recolors or moves a delivery label (updates object: name, color, order). Only what is sent changes; deliveries keep it. Idempotent. Returns the label. Requires edit access to Deliveries.

Escopo
deliveries:write
Permissão
Editar no módulo
Tool do MCP
deliveries_labels_updateNa superfície completa; na compacta, mb_execute_operation com id: "deliveries.labels.update".

Custo declarado: até 1 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

label_idstringrotaobrigatório

The delivery label id (deliveries.labels.list).

updatesobjectcorpoobrigatório

The fields to change.

Resposta

labelobject

The label as saved.

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/deliveries/labels/{label_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X PATCH "https://api.mb-suite.com/v1/deliveries/labels/{label_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
DELETE/v1/deliveries/labels/{label_id}

Delete a delivery label

deliveries.labels.delete

IrreversívelDesde 2026-11-01

Deletes a delivery label and removes it from every delivery that had it (deliveries_updated says how many). The label goes to the 30-day trash and owners and admins can restore it; restoring puts it back on those deliveries (the ones deleted meanwhile are skipped; the trash keeps up to 5,000 of them, and with more the trash item says linked_truncated). Outside the screen it needs a dry run (it names the label and counts the deliveries that have it) and a confirm_token, or a simple DELETE with a key that may delete. Requires edit access to Deliveries.

Com uma API key, este DELETE roda direto: o registro fica 30 dias na lixeira e a resposta traz o seu trash_item_id. Com um token OAuth, e pelo MCP, pede dry_run → confirm_token.

Escopo
deliveries:write e «Permitir exclusões» (deliveries:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
deliveries_labels_deleteNa superfície completa; na compacta, mb_execute_operation com id: "deliveries.labels.delete".

Custo declarado: até 1001 leituras e 1001 escritas por chamada (contam na cota diária).

Parâmetros

label_idstringrotaobrigatório

The delivery label id (deliveries.labels.list).

Resposta

oktrue

Always true.

deliveries_updatednumber

How many deliveries it was removed from.

trash_item_idstring

The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.

trash_item_idsarray<string>

Only when the deletion left more than one copy: all of them, the first being trash_item_id.

trash_expires_atnumber

When the copy leaves the trash for good (epoch ms): 30 days after the deletion.

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/deliveries/labels/{label_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/deliveries/labels/{label_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"