Skip to main content
Every hedge is tied to a customer, which is used for mapping - attributing hedges to your end customers and reconciling exposure per customer. If you don’t need per-customer mapping, you can use a single customer for all your hedges. Create your first customer using the create customer API:
curl -X POST https://api.grainfinance.co/v1/customers \
  -u "{clientId}:{secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "contactEmail": "{contactEmail}",
    "contactFullName": "{contactFullName}",
    "contactPhoneNumber": "{contactPhoneNumber}",
    "companyName": "{companyName}",
    "companyAddress": "{companyAddress}",
    "externalCustomerId": "{externalCustomerId}",
    "companyCity": "{companyCity}"
  }'
In the response, you will receive the id of the created customer.
{
  "id": "{customerId}"
}