diff --git a/docs/index.html b/docs/index.html index 1e9b380..e9e8fec 100644 --- a/docs/index.html +++ b/docs/index.html @@ -806,7 +806,8 @@
{- "expenses": [
- {
- "cost": "25.0",
- "group_id": 391,
- "description": "Brunch",
- "details": "string",
- "date": "2012-05-02T13:00:00Z",
- "repeat_interval": "never",
- "currency_code": "USD",
- "category_id": 15,
- "id": 51023,
- "friendship_id": 4818,
- "expense_bundle_id": 491030,
- "repeats": true,
- "email_reminder": true,
- "email_reminder_in_advance": null,
- "next_repeat": "string",
- "comments_count": 0,
- "payment": true,
- "transaction_confirmed": true,
- "repayments": [
- {
- "from": 6788709,
- "to": 270896089,
- "amount": "25.0"
}
], - "created_at": "2012-07-27T06:17:09Z",
- "created_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "updated_at": "2012-12-23T05:47:02Z",
- "updated_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "deleted_at": "2012-12-23T05:47:02Z",
- "deleted_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "category": {
- "id": 5,
- "name": "Electricity"
}, - "users": [
- {
- "user": {
- "id": 491923,
- "first_name": "Jane",
- "last_name": "Doe",
- "picture": {
- "medium": "image_url"
}
}, - "user_id": 491923,
- "paid_share": "8.99",
- "owed_share": "4.5",
- "net_balance": "4.49"
}
], - "comments": [
- {
- "id": 79800950,
- "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99",
- "comment_type": "System",
- "relation_type": "ExpenseComment",
- "relation_id": 855870953,
- "created_at": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "user": null
}
]
}
]
}Creates an expense. You may either split an expense equally (only with group_id provided),
or supply a list of shares.
If providing a list of shares, each share must include paid_share and owed_share, and must be identified by one of the following:
When splitting equally, the authenticated user is assumed to be the payer.
+When providing a list of shares, each share must include paid_share and owed_share, and must be identified by one of the following:
email, first_name, and last_nameuser_id{- "input": "I owe Ada 5 bucks",
- "autosave": false
}{- "expense": {
- "cost": "25.0",
- "group_id": 391,
- "description": "Brunch",
- "details": "string",
- "date": "2012-05-02T13:00:00Z",
- "repeat_interval": "never",
- "currency_code": "USD",
- "category_id": 15,
- "id": 51023,
- "friendship_id": 4818,
- "expense_bundle_id": 491030,
- "repeats": true,
- "email_reminder": true,
- "email_reminder_in_advance": null,
- "next_repeat": "string",
- "comments_count": 0,
- "payment": true,
- "transaction_confirmed": true,
- "repayments": [
- {
- "from": 6788709,
- "to": 270896089,
- "amount": "25.0"
}
], - "created_at": "2012-07-27T06:17:09Z",
- "created_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "updated_at": "2012-12-23T05:47:02Z",
- "updated_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "deleted_at": "2012-12-23T05:47:02Z",
- "deleted_by": {
- "id": 0,
- "first_name": "Ada",
- "last_name": "Lovelace",
- "email": "ada@example.com",
- "registration_status": "confirmed",
- "picture": {
- "small": "string",
- "medium": "string",
- "large": "string"
}
}, - "category": {
- "id": 5,
- "name": "Electricity"
}, - "users": [
- {
- "user": {
- "id": 491923,
- "first_name": "Jane",
- "last_name": "Doe",
- "picture": {
- "medium": "image_url"
}
}, - "user_id": 491923,
- "paid_share": "8.99",
- "owed_share": "4.5",
- "net_balance": "4.49"
}
], - "comments": [
- {
- "id": 79800950,
- "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99",
- "comment_type": "System",
- "relation_type": "ExpenseComment",
- "relation_id": 855870953,
- "created_at": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "user": null
}
]
}, - "valid": true,
- "confidence": 0.5,
- "error": "string"
}