Files Via API
Introduction
You can now collect your Payment Information Files by API, which stands for Application Programming Interface. An API is a set of rules and protocols that allow two separate applications to talk to one another.
A great analogy for this is if you go out to a restaurant for food, you don’t go into the kitchen yourself and start making food. At a restaurant you give your order to one of the waiting staff, who take that order to the kitchen, the staff prepare the food according to your order and then the waiting staff bring it back out to you. In this analogy the waiting staff are like the API.
To work with the allpay API you will need to ask your development team to ‘pass’ us the appropriate information indicated in the What should I give? box, below. You’ll notice that you will need to pass us an Apim subscription key, this is easy to find. Navigate to the Files Via Api page on the Payments Hub and at the top left you’ll find the Apim subscription key
For all requests you'll also need to generate a 'Subscription Key' this is easy to do. To generate a subscription key, simply navigate to Files Via Api on the Payments Hub, pop a name into the Key Name box and press the Generate Key button.
Requests
There are five requests that File by Api will respond to:
Technical Bit (Call) | What should I give? | What will I get? |
/File |
· Generated Subscription Key · APIM subscription key · The Type of File you would like: Payment files, Information files or all files (optional) · In the body of the request, provide a list of client codes associated with your organisation. |
All files that have been made available since last download |
/File/Filenames | · Generated Subscription Key · APIM Subscription Key · List of file extensions you’re searching for (STA, DIR, PO, PO etc) · The type of File that you’re looking for: Payment files, Information files or all files · In the body of the request, provide a list of client codes associated with your organisation. |
All filenames that match the given filters |
/File/Redownload | · Generated Subscription Key · APIM Subscription Key · The Type of File you would like: Payment files, Information files or all files · In the body of the request provide the Date Range, File Names, File Numbers*, and client codes. |
All files in the ranges that you have requested** |
/File/DownloadHistory | · Organisation ID · Generated Subscription Key · APIM Subscription Key |
The 10 most recent files downloaded alongside · Who downloaded it · When it was downloaded(date) · The name of the file · The product it was downloaded on (File Manager, Totalconnect, File by API) |
/File/CheckIfFilesReadyToDownload | · Organisation ID · Subscription Key · APIM Subscription key |
Whether or not your files are ready to be downloaded |