Skip to content
This repository was archived by the owner on Oct 14, 2022. It is now read-only.

Commit 15c47a4

Browse files
authored
Merge pull request #115 from unbill/BDCS-4700
add listByPartner api call
2 parents 5f35079 + 9dd7b86 commit 15c47a4

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
## List all bills by partnerId
2+
3+
> Example Request
4+
5+
```shell
6+
curl <%= config.host %>/bill/listByPartner/616f208da973a0828ecd015c
7+
-H "<%= config.auth %>"
8+
-G
9+
```
10+
11+
> Example Response
12+
13+
```json
14+
{
15+
"data": [
16+
{
17+
"bill": {
18+
"_id": "579b695decfa11012711875d",
19+
"auth": {
20+
"_id": "616f208da973a0828ecd0166",
21+
"created": "2021-10-19T19:46:21.685Z",
22+
"status": {
23+
"type": "verified"
24+
},
25+
"company": {
26+
"_id": "579b695decea110719b1874d",
27+
"name": "<%= config.billerName %>",
28+
"logo": {
29+
"url": "<%= config.billerLogo %>",
30+
"background": false
31+
},
32+
"schedule": "on-due-date"
33+
},
34+
"items": ["bill"]
35+
},
36+
"balance": "100.00",
37+
"customPaymentAmount": "50.00",
38+
"dueDate": "<%= config.futureDate %>",
39+
"payDate": "<%= config.futureDate %>",
40+
"status": {
41+
"type": "upcoming"
42+
},
43+
"settings": {
44+
"recurring": "enabled",
45+
"schedule": "on-due-date"
46+
},
47+
"company": {
48+
"_id": "579b695decea110719b1874d",
49+
"name": "<%= config.billerName %>",
50+
"logo": {
51+
"url": "<%= config.billerLogo %>",
52+
"background": false
53+
},
54+
"schedule": "on-due-date"
55+
}
56+
},
57+
"payments": [],
58+
"partnerUserId": "616f208da973a0828ecd0164",
59+
"partnerId": "616f208da973a0828ecd015c"
60+
},
61+
]
62+
}
63+
```
64+
65+
Retrieves a list of partner's active bills.
66+
67+
### HTTP Request
68+
69+
`GET <%= config.host %>/bill/listByPartner/{partnerId}`
70+
71+
### Arguments
72+
73+
Parameter | Description
74+
----- | -----------
75+
`partnerId` | ID of the partner to retrieve bills for.
76+
77+
78+
### Returns
79+
80+
A dictionary with a `data` property that contains an array of bill details.

source/index.html.md.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ includes:
2727
- api/bill/schedule
2828
- api/bill/details
2929
- api/bill/list
30+
- api/bill/list-by-partner
3031
- api/company/index
3132
- api/company/object
3233
- api/company/logos

0 commit comments

Comments
 (0)