Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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/v1/flex/orders/1234568/files

Response:

{
  files: [
    {
      "id": "d2f48dkad267a86d2858244d0c2c1937",
      "name": "The-name-of-the-file.pdf",
      "url": "https://beta-api.ambita.com/shopping/v2/assets/d2f48dkad267a86d2858244d0c2c1937",
      "status": "OK",
      "category": "PRODUCT_UTEN_KATEGORI",
      "product": "WI99990000"
    },
    ...
  ]
}

You should store the id together with the file, to know if you have downloaded the file previously.

Status

Description

NEW

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.

UPDATED

This status is sent when a new file has arrived and you should get the new file. This status can be sent multiple times.

FINISHED

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.

CANCELLED

This status is sent when the order is cancelled, you should delete the files that you have received on this order.

REFUNDED

This status is sent when the order is refunded, you should delete the files that you have received on this order.

  • No labels