Documentation

Overview

Ingrid provides HTTP endpoints returning data in JSON format. We provide you with two environments:

Note

Please note that we reserve the right to introduce additional fields to our API responses without prior notification. Users are encouraged to regularly check for updates in our documentation for any changes that may impact their integration.

Authorization

When you register with Ingrid you will receive an API token. This token must be send with every request in the Authorization HTTP header with the Bearer prefix followed by base64 encoded token. Each request to our server will look more or less like:

POST /v1/delivery_checkout/session.create HTTP/1.1
Host: api.ingrid.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer XXE5ODA0NTU0Y2JmNDRkYjhiYTdhM2NhX2EyZjFiNGE=

{

}

Observability

All Ingrid responses will containt a X-Trace-Id header. In case of any problems or question, providing this value to us will allow us to go back to you with more accurate feedback.

POST /v1/delivery_checkout/session.create HTTP/1.1
Status-Code: 200
Host: api.ingrid.com
Content-Type: application/json
X-Trace-Id: P20220926140104MYAKATVMYPZT3S9Q
{

}

Client Generation

Since Ingrid's API is built on top of OpenAPI specification you can use different tools to auto-generate API clients. Two that we recommend are Autorest that works great if you are on the Dotnet stack and OpenAPI Generator that works great for the rest of the programming languages.

Below are two simple examples that you can use as base to generate API clients.

Using Autorest generator to generate a C# client.

$ npm install -g autorest
$ curl -o swagger.json https://api.ingrid.com/v1/delivery_checkout/_/swagger.json
$ autorest --csharp \
--clear-output-folder \
--input-file=swagger.json \
--override-client-name=SiwClient \
--namespace=Ingrid
--add-credentials \
--output-folder=siw

Using OpenAPI Generator to generate a PHP client.

$ openapi-generator generate \
-i https://api.ingrid.com/v1/delivery_checkout/_/swagger.json \
-g php \
-o siw

Last updated: Fri, Dec 20, 06:15 AM