Some usage example of the Mantle Gateway:

Creating a Receipt

This operation correspond to posting data on a network, the reponse is a Receipt that contains the pointer to the data posted.

cURL example

curl -X POST 'https://develop.api.mantle.technology/gateway/receipt' -H 'x-api-key:{{API_KEY}}' -F 'file=@{{PATH_TO_FILE}}'

Response:

{
  "id":"000000000000000000000000",
  "billId":"000000000000000000000000",
  "pointer":"string",
  "email":"string",
  "clientId":"000000000000000000000000",
  "fileName":"string",
  "creationDate":"2022-12-12T14:09:22.406Z",
  "isDeleted":boolean,
  "queryParams":{JSON}
}

Get a Receipt

This operation correspond to downloading the data at a pointer.

A receiptId is needed to perform this action

cURL example

curl GET 'https://develop.api.mantle.technology/gateway/receipt/{receiptId}' --H 'x-api-key: {{API_KEY}}'

Response:

The Gatway return a stream containing the data at the pointer of the Receipt

Get all Receipts

This operation will return a list of the Receipts created.

cURL example

curl GET 'https://develop.api.mantle.technology/gateway/receipt' --H 'x-api-key: {{API_KEY}}'

Response:
A list of Receipts

[
  {
    "id":"000000000000000000000000",
    "billId":"000000000000000000000000",
    "pointer":"string",
    "email":"string",
    "clientId":"000000000000000000000000",
    "fileName":"string",
    "creationDate":"2022-12-12T14:09:22.406Z",
    "isDeleted":boolean,
    "queryParams":{JSON}
  }
]