Atualizar Tags

Siga nosso passo a passo para atualizar uma Ordem.

Atualizar tags

1 - Esse endpoint permite atualizar uma tag a partir da conta informada.

❗️

lembre-se de sempre enviar o token(Authorization) no header da requisição.

endpoint: {{base_url}}/partner/baas/account/orders/update_tags

verbo http PATCH

{{base_url}} será substituida pela URL da sua empresa.

2 - Para atualizar uma tag é necessário o envio do seguinte parâmetro.

CHAVEVALORDESCRIÇÂO
account{{account}}conta para consulta das ordens com status (agendada) (OBRIGATÒRIO)
add{{add}}adiciona uma nova tag (OPCIONAL)
remove{{remove}}remove a tag escolhida (OPCIONAL)
id{{id}}identificador da Ordem (OBRIGATÓRIO)
order_id{{order_id}}identificador da Ordem (OBRIGATÓRIO)
type{{type}}tipo da ordem (OBRIGATÓRIO)
{
    "data": {
        "attributes": {
            "add": "Add tag teste",
            "remove": "Remove tag teste"
        },
        "id": "11111",
        "type": "orders"
    },
    "order_id": "11111",
    "account": "{{account}}"
}

3 - Se tudo ocorrer bem, você receberá uma resposta com Status 200 OK

Corpo da resposta com sucesso:

{
    "data": {
        "id": "15401",
        "type": "ted-transfers",
        "attributes": {
            "user-id": 1,
            "type": "TedTransfer",
            "status": "scheduled",
            "cancel-reason": null,
            "reverse-reason": null,
            "auth-code": "{{account}}42990",
            "date": "18/02/2022",
            "value": "50.0",
            "agency": "4298",
            "account": "{{account}}",
            "tags": [
                "Tag teste T"
            ],
            "ticket-code": null,
            "updated-at": "2022-03-22T11:16:30.461-03:00",
            "created-at": "2022-02-18T11:07:25.906-03:00",
            "scheduled-at": "2022-02-18T11:07:26.617-03:00",
            "ticketed-at": null,
            "canceled-at": null,
            "late-at": null,
            "done-at": null,
            "cops-updated-at": null,
            "cops-user": null,
            "reversed-at": null,
            "ticket-auth-code": null,
            "ticket-cancel-reason": null,
            "errors": {},
            "scheduled?": true,
            "schedulable?": false,
            "waiting?": false,
            "done?": false,
            "canceled?": false,
            "ticketed?": false,
            "late?": false,
            "prewaiting?": false,
            "reversed?": false,
            "manual-approved": false,
            "display-amount": "50.0",
            "financial-institution-id": null,
            "liquidated?": false,
            "liquidatable?": false,
            "reviewable?": false,
            "approved-by": "Nome Do Banco",
            "created-by": "Nome Do Banco",
            "confirmed-by": "",
            "canceled-by": "",
            "scheduled-by": "Sistema",
            "reversed-by": "",
            "cancelable-by-user?": false,
            "cancelable-by-manager?": false,
            "user": {
                "name": "Nome Do Banco",
                "account": "{{account}}",
                "document": "CPF/CNPJ",
                "holder": 1,
                "phone": "",
                "uid": "{{account}}[email protected]",
                "payment_max_value": "9999999.99",
                "info_email": "",
                "set_password": false,
                "set_short_password": false
            },
            "external-order-id": null,
            "external-payer-name": null,
            "external-payer-document": null,
            "external-liquidator-name": null,
            "external-payer-agency": null,
            "external-payer-account": null,
            "md5-hash": null,
            "non-customer": null,
            "liquidation-disponibility-id": null,
            "late-reason": null,
            "origin": "ib",
            "competence": null,
            "total": "0.0",
            "interest": "0.0",
            "other-value": "0.0",
            "social-security-code-id": null,
            "pix-favored": null,
            "description": null,
            "pix-transaction-id": null,
            "pix-transaction-account-id": null,
            "favored-id": 2000,
            "favored-name": null,
            "favored": {
                "id": 2000,
                "name": "Cash Way",
                "document": "108{{account}}030902",
                "agency": "0001",
                "account": "999999",
                "bank_id": 226,
                "created_at": "2022-02-18T10:12:16.710-03:00",
                "updated_at": "2022-02-18T10:12:16.710-03:00",
                "user_id": 1,
                "max_value": 5000000,
                "approved": true,
                "manager_id": 1,
                "poup": false,
                "user_account": "{{account}}",
                "user_agency": "4298",
                "internal": false,
                "active": true,
                "account_type": "checking",
                "origin": "system"
            },
            "transfer-reason": {
                "id": 1,
                "description": "Crédito em Conta",
                "created_at": "2020-05-01T13:34:21.245-03:00",
                "updated_at": "2020-05-01T13:34:21.245-03:00",
                "active": true,
                "str_code": "10"
            },
            "bank": {
                "id": 226,
                "title": "Nu Pagamentos S.A.",
                "code": "260",
                "document": null,
                "site": null,
                "created_at": "2020-05-01T13:34:{{account}}.270-03:00",
                "updated_at": "2020-10-05T15:38:13.160-03:00",
                "active": true,
                "short_name": "NU PAGAMENTOS S.A.",
                "ispb": "18236120"
            },
            "history": "",
            "fee-amount": "7.0",
            "cashier-operation": null
        }
    }
}

📘

Execute um teste em nosso sandbox Clique aqui