Idempotent requests

The API supports idempotency for safely retrying requests without performing the same operation twice. To make an idempotent request, provide an Idempotency-Key header.

curl https://api.thestudentguarantor.com/v1/applications \
  -H "Authorization: Bearer tsg_test_sk_4f9c…" \
  -H "Idempotency-Key: 6f1c2a9e-8f0b-4c59-9d0e-2b7a54d0c1aa" \
  -d @application.json

The API saves the status code and body of the first request made with a key and returns them for subsequent requests with the same key. Keys expire after 24 hours and can be up to 255 characters. We recommend V4 UUIDs. Reusing a key with different parameters returns 409.

All POST and PATCH requests accept idempotency keys. GET and DELETE requests are idempotent by definition.