Skip to content

Commit

Permalink
feat(api-core): add example response for file delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
Christie Baker authored and Christie Baker committed Nov 20, 2018
1 parent eb75160 commit edc4df5
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions packages/api-core/src/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,44 @@ Upload a batch of files to a designated channel configured on the server.
#### `uploadFilesDelivery(data, config)`
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.

Example:
Example `data`:
```html
data = {
deliveries:
[ {
fileURI: upload.references[0],
deliveryChannel: 'DEMO',
metadata: { payerId: "DEMOPAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName" },
metadata: { payerId: "PAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName" },
} ]
};
```
`config` should contain `customerId` and `clientId`

#### Example Response
```html
{ "id": "123456", // batchId
"status": "COMPLETE", // COMPLETE/INPROGRESS
"deliveries": [
{
"id": "56789", // deliveryId
"deliveryBatchId": "123456",
"fileURI": <fileUri>,
"deliveryChannel": "DEMO",
"deliveryStatus": "ERRORED", // INPROGRESS/REJECTED/ERRORED/DELIVERED
"errors": [
{
"message": "error message",
"subject": "subject of error"
}
],
"metadata": {
payerId: "PAYERID", requestId: "123", patientLastName: "lastName", patientFirstName: "firstName"
}
}
]
}
```

### `AvSettings`

Store and retrieve settings to be reused.
Expand Down

0 comments on commit edc4df5

Please sign in to comment.