Ir para conteúdo principal

Web API – Despesas

Documentação da Web API para Registos de Despesas

Listar Despesas

URL do Pedido

Parâmetros de consulta

  • startDate – Formato ‘yyyy-mm-dd’, por exemplo ‘2015-01-31’ significa meia-noite de 31 de janeiro de 2015 no seu fuso horário local. Inclusive.

  • endDate – Formato ‘yyyy-mm-dd’, por exemplo ‘2015-12-31’. Inclusive.

  • userEmail – Endereço de email de um utilizador específico a pesquisar.

  • activity – Atividade da viagem, por exemplo ‘Business’.

  • category – Income, Sales, Services, Reimburse, Dividend, Gas, Oil, Tires, Repairs, Insurance, Registration, Garage, Lease, Taxes, Interest, Other, Advertising, BusinessHome, Commissions, Contractors, CostOfGoods, Depletion, Depreciation, EmpBenefit, Gifts, InsuranceBiz, InterestMort, InterestOther, LegalProf, Meals, Office, Pension, RentEquipment, RentOther, RepairsBiz, Supplies, TaxesLicenses, Transporation, TravelBaggage, TravelLodging, TravelMisc, Utilities, Wages, OtherBiz, BankTransfer, etc.

  • minLastUpdated – A data em que o registo foi modificado ou criado. Formato ‘yyyy-mm-dd’. Inclusive.

  • maxLastUpdated – A data em que o registo foi modificado ou criado. Formato ‘yyyy-mm-dd’. Inclusive.

  • status – A = Aprovado, U = Não Enviado, P = Pagamento Agendado, S = Enviado, R = Rejeitado

Nota

Tem de fornecer pelo menos um dos parâmetros de consulta no pedido.
A data/hora devolvida na resposta está no fuso horário UTC, conforme o padrão JSON.

Exemplo

Exemplo de Resposta JSON

{
"message": "OK",
"expenses": [
{
"id": 20001951,
"url": "https://app.triplog.net/web/api/expenses/20001951",
"lastUpdated": "2024-07-05T16:49:34.390Z",
"user": {
"id": 297603,
"url": "https://app.triplog.net/web/api/users/297603",
"email": "bt@bizlog.com",
"display": "Driver, TripLog"
},
"date": "2024-07-03T07:00:00.000Z",
"category": "CC-Purchases",
"subcategory": null,
"vehicle": null,
"odometer": null,
"activity": "Business",
"merchant": "tesco",
"location": null,
"amount": 20.0,
"tax": 0.0,
"tags": null,
"notes": null,
"status": "Not Submitted",
"statusUpdateTime": null,
"statusUpdatedBy": null,
"reminder": false,
"reminderNumIntervals": null,
"reminderInterval": null,
"reminderMileage": null,
"receipts": "https://app.triplog.net/web/api/expenses/20001951/receipts"
},
{
"id": 20001953,
"url": "https://app.triplog.net/web/api/expenses/20001953",
"lastUpdated": "2024-07-05T16:51:51.456Z",
"user": {
"id": 297603,
"url": "https://app.triplog.net/web/api/users/297603",
"email": "bt@bizlog.com",
"display": "Driver, TripLog"
},
"date": "2024-07-04T07:00:00.000Z",
"category": "CC-Purchases",
"subcategory": null,
"vehicle": null,
"odometer": null,
"activity": "Business",
"merchant": "MagRonalds",
"location": null,
"amount": 40.0,
"tax": 0.0,
"tags": null,
"notes": null,
"status": "Not Submitted",
"statusUpdateTime": null,
"statusUpdatedBy": null,
"reminder": false,
"reminderNumIntervals": null,
"reminderInterval": null,
"reminderMileage": null,
"receipts": "https://app.triplog.net/web/api/expenses/20001953/receipts"
}
]
}
Isto respondeu à sua pergunta?