GotSurge Partnership Internal API (0.1.0)

Download OpenAPI specification:Download

Introduction

Gotsurge Partnership Internal API only allow for internal usage and need bearer auth token to access any of resources header.

Please leave immediately if you don't have access! For public access, please use this endpoint instead https://development-api-docs.gotsurge.co/partnership.html

Cross-Origin Resource Sharing

This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec. And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.

Authentication

GotSurge offers three forms of authentication:

  • BearerAuth (JWT) - JSON Web Token (JWT) is a compact URL-safe means of representing claims to be transferred between two parties
  • NoAuth - Disables authorization checking
  • OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.

bearerAuth

Security Scheme Type: HTTP
HTTP Authorization Scheme: bearer
Bearer format: JWT

Server Information

Return the liveness of the service

Return the liveness of the service

Responses

Response samples

Content type
application/json
{
  • "is_alive": true
}

Partner Authorization

Create a new partner authorization

Only SysAdmin is authorized.

Authorizations:
bearerAuth
Request Body schema: application/json
name
required
string

partner name

webhook_url
required
string

partner webhook_url

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "webhook_url": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "client_key": "string",
  • "secret_key": "string",
  • "webhook_url": "string",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Return the list of partners

Return the list of partners

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "partner_authorizations": [
    ]
}

Update a partner authorization

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
partnerAuthorizationID
required
string

ID of the partner to be updated

Request Body schema: application/json
name
required
string

partner name

webhook_url
required
string

partner webhook_url

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "webhook_url": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "client_key": "string",
  • "secret_key": "string",
  • "webhook_url": "string",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a new partner authorization

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
partnerAuthorizationID
required
string

ID of the partner to be deleted

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully delete the partner"
}

Return the detail of a partner

Return the detail of a partner

Authorizations:
bearerAuth
path Parameters
partnerAuthorizationID
required
string

ID of the partner to be read

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "client_key": "string",
  • "secret_key": "string",
  • "webhook_url": "string",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Partner Basic Detail

You can use the your client_key to get basic detail of partner information.

For detail client_key, please ask hello@gotsurge.co

path Parameters
client_key
required
string

Client key of the partner to be read

Responses

Response samples

Content type
application/json
{
  • "client_key": "string",
  • "name": "string",
  • "webhook_url": "string"
}

User Authentication

Create user authentication permission log

Only OrgAdmin / User is authorized.

Authorizations:
bearerAuth
Request Body schema: application/json
refresh_token
required
string
required
object

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string",
  • "client_auth": {
    }
}

Response samples

Content type
application/json
{
  • "auth_code": "string",
  • "server_time": "2019-08-24T14:15:22Z"
}

Return user authentication permission log by code

Only SysAdmin is authorized.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "auth_code": "string",
  • "client_auth": {
    },
  • "token": "string",
  • "name": "string",
  • "email": "string",
  • "roles": "string",
  • "org_id": "string",
  • "created_at": "2019-08-24T14:15:22Z"
}

Platform Partners

Session Sign In

Generate session_id after sign in with email and password

header Parameters
X-Platform-ID
required
string

Platform Organization ID

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "session_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}