Documentation feedback

Was this helpful?

SDKs and libraries

Use the API from your application

The examples use the HTTP contract published in the API reference, so they work with the supported C#/.NET stack and command-line tools.

cURL #

Use --fail-with-body during development to preserve the API error payload while returning a failing exit code.

curl --fail-with-body --request GET "https://api.velosity.one/v1/customers?page=1&pageSize=25" \
  --header "Accept: application/json" \
  --header "X-APIKEY: YOUR_API_KEY"

When an operation exposes different pagination parameter names, use the names and limits shown in its API-reference parameter table.

C# / .NET #

Create one HttpClient for the API origin, add the key on each request, and retain the response body when a request fails.

using System.Net;
using System.Net.Http.Headers;

using var client = new HttpClient
{
    BaseAddress = new Uri("https://api.velosity.one")
};

using var request = new HttpRequestMessage(HttpMethod.Get, "/v1/customers?page=1&pageSize=25");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
request.Headers.Add("X-APIKEY", "YOUR_API_KEY");

using var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();

if (!response.IsSuccessStatusCode)
    throw new HttpRequestException($"Velosity returned {(int)response.StatusCode}: {body}");

Console.WriteLine(body);

Paginate safely #

  1. Start with the documented default or a conservative page size.
  2. Keep the query filters and sort order unchanged while requesting later pages.
  3. Checkpoint the last successful page and retry only the failed page.
  4. Stop at the contract’s documented final-page indicator or when the returned item collection is empty.

The OpenAPI reference is authoritative for an operation’s parameter names, response schema, and page-size constraints.