When a order is placed in our components, a POST request will be sent to a url that your application provides with the following body
{ "orderCollectionId": 1234567, "reference": "some-reference", "status": "SOME-STATUS", "technicalReference": "some-technical-reference" }
When this happens you should call our api and do the following action based on the status
property.
If you did not setup the authentication flow already, you should do this first here.
curl -s \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ej577asf-a5k6-42yq-a3a2-fh03hb8cb58c" \ https://beta-api.ambita.com/infoland/flex/order/1234568/files
Response:
{ files: [ { "id": "d2f48dkad267a86d2858244d0c2c1937", "name": "The-name-of-the-file.pdf", "url": "https://beta-api.ambita.com/shopping/v2/assets/d2f48dkad267a86d2858244d0c2c1937", }, ... ] }
You should store the id
together with the file, to know if you have downloaded the file previously.
Status | Description |
---|---|
| This status is the same as an order confirmation email, it confirms that our order system has received the order and is ready to process the order. |
| This status is sent when a new file has arrived and you should get the new file. This status can be sent multiple times. |
| This status is sent when an order is set to finished, you should check if you have received all the files. NB! Files might get delivered even after the order is finished, so you might get this status more than once. |
| This status is sent when the order is cancelled, you should delete the files that you have received on this order. |
| This status is sent when the order is refunded, you should delete the files that you have received on this order. |
The files can have the following product categories:
Product category | Description |
---|---|
PRODUKT_UTEN_KATEGORI | |
KOMMUNAL_INFORMASJON | |
FORRETNINGSFORERINFORMASJON | |
FERDIGATTEST_OG_MIDLERTIDIG_BRUKSTILLATELSE | |
PROSPEKT | |
SALGSOPPGAVEVEDLEGG | |
VEDTEKTER |