Authorization
header of every request and Stedi determines which resources you can access.
test
or production
prefix to indicate the key type.Authorization
header. For example, if your API key is Jclcke.ZHqS3demo4dS16XZ1KeyBY7
, you would insert it into the header according to the following example:
Key
(e.g.
Authorization: Key Jclcke.ZHqS3demo4dS16XZ1KeyBY7
) for
backwards-compatibility.next_page_token
. To retrieve the next page of results, repeat the request, but add the query parameter page_token
and give it the value you received in the response.
For example, when you call the List Transactions API, the result contains a list of every transaction within your Stedi account and a token for the next page.
next_page_token
, there are more results available. If a response doesn’t contain next_page_token
, then you’re on the last page.
4xx
range and the response body will contain the following two fields.
error
– A code indicating what went wrong.message
– A human-readable message describing what went wrong.error
to write code that handles the error and you can use message
when you’re debugging the problem yourself. If a response needs to report multiple errors, it will include an array called errors
, but even in that case, the error
and message
fields will be available at top level.
It’s possible for a response to contain both a result and an error. This happens when something went wrong, but the API is able to give a partial or best-effort result.
403
Unauthorized403
error from Stedi, it’s likely due to one of the following reasons:
GET
request to an endpoint that only accepts POST
requests.422 Unprocessable Entity
error. After 24 hours, Stedi allows the request to execute again even if you submit the same idempotency token.
If you reuse the same key on a new request while the original request is still being processed, Stedi returns a 409 Conflict
. You can retry the request after the original request is completed. The 409
response includes a Retry-After
header indicating a suggested number of seconds to wait before retrying.
Idempotency-Key
header of your request. Our implementation conforms to the draft IETF Idempotency-Key HTTP Header Field RFC.
The token can be any unique string, such as a UUID. Common approaches to generating tokens are: