Goki API
Search…
Introduction
You can use Swagger or Postman to make the calls and test the APIs. Please make sure you are using the right environment as explained in Getting Started. If you are building a marketplace app, your app should be approved and live in the staging or production environments before you can test it.
If your app is not live (you cannot see it in the marketplace) you can contact [email protected].
Make sure you have got the correct credentials and they are included in the request's header. All API calls need to have the header set.

How to read the APIs?

For simplicity, we have removed all the authentication headers in this documentation. And they are explained in the Credentials section.

Handling Errors

All error responses are following the below structure:
1
{
2
"error": {
3
"code": "number",
4
"title": "string",
5
"message": "string",
6
"status": "number",
7
"reason": "string"
8
}
9
}
Copied!
Property
Type
Description
code
number
title
string
Title of the occurred error.
message
string
A message which describes why the error has happened.
status
number
HTTP status code.
reason
string
Reason of the error (optional).

Sample Error

1
{
2
"error": {
3
"code": 6,
4
"title": "ALREADY_EXISTS",
5
"message": "This document already exists",
6
"status": 409,
7
"reason": "pmsNumberIsDuplicate"
8
}
9
}
Copied!

Error Code

1
CANCELLED = 1
2
UNKNOWN = 2
3
INVALID_ARGUMENT = 3
4
DEADLINE_EXCEEDED = 4
5
NOT_FOUND = 5
6
ALREADY_EXISTS = 6
7
PERMISSION_DENIED = 7
8
RESOURCE_EXHAUSTED = 8
9
FAILED_PRECONDITION = 9
10
ABORTED = 10
11
OUT_OF_RANGE = 11
12
UNIMPLEMENTED = 12
13
INTERNAL = 13
14
UNAVAILABLE = 14
15
DATA_LOSS = 15
16
UNAUTHORIZED = 16
17
METHOD_NOT_ALLOWED = 17
18
NOT_ACCEPTABLE = 18
Copied!

General Errors

There are some errors that are common between all APIs.

Authentication error

When your provided authentication tokens are wrong, you will get the following error
1
{
2
"error": {
3
"code": 16,
4
"title": "UNAUTHORIZED",
5
"status": 401,
6
"message": "valid credential required",
7
"reason": "invalidCredentials"
8
}
9
}
Copied!

Validation Error

When your provided data is wrong (you missed a required field or type of a field is not match with what the API expects) you will get a validation error.
1
{
2
"error": {
3
"code": 3,
4
"title": "INVALID_ARGUMENT",
5
"status": 400,
6
"message": "A message which describes the error."
7
}
8
}
Copied!
Last modified 1mo ago