Skip to content

Commit edc4df5

Browse files
Christie BakerChristie Baker
authored andcommitted
feat(api-core): add example response for file delivery
1 parent eb75160 commit edc4df5

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

packages/api-core/src/resources/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,44 @@ Upload a batch of files to a designated channel configured on the server.
129129
#### `uploadFilesDelivery(data, config)`
130130
Method to upload a batch of file deliveries. `data` contains an array of `deliveries`. Provide the `fileUri` (reference field from AvFiles), `deliveryChannel`, and the required `metadata` for that channel.
131131

132-
Example:
132+
Example `data`:
133133
```html
134134
data = {
135135
deliveries:
136136
[ {
137137
fileURI: upload.references[0],
138138
deliveryChannel: 'DEMO',
139-
metadata: { payerId: "DEMOPAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName" },
139+
metadata: { payerId: "PAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName" },
140140
} ]
141141
};
142142
```
143143
`config` should contain `customerId` and `clientId`
144144

145+
#### Example Response
146+
```html
147+
{ "id": "123456", // batchId
148+
"status": "COMPLETE", // COMPLETE/INPROGRESS
149+
"deliveries": [
150+
{
151+
"id": "56789", // deliveryId
152+
"deliveryBatchId": "123456",
153+
"fileURI": <fileUri>,
154+
"deliveryChannel": "DEMO",
155+
"deliveryStatus": "ERRORED", // INPROGRESS/REJECTED/ERRORED/DELIVERED
156+
"errors": [
157+
{
158+
"message": "error message",
159+
"subject": "subject of error"
160+
}
161+
],
162+
"metadata": {
163+
payerId: "PAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName"
164+
}
165+
}
166+
]
167+
}
168+
```
169+
145170
### `AvSettings`
146171

147172
Store and retrieve settings to be reused.

0 commit comments

Comments
 (0)