OGOship has an open API for developers. You can manage orders, products, stock, returns, webhooks and metadata through the API.
Test account and merchant
Please create a free test account and a merchant profile to myOGO. You can generate and copy a new secret token at the merchant setting edit page in your myOGO account.
API documentation can be found from here.
.Net standard 2.0 library can be found: Github or as a Nuget package.
PHP sample can be found on GitHub.
Generating authentication token
The API uses a JWT token for authentication. Currently, it is possible to use a Resource owner password based flow to generate a token. The token is valid for 1.5 hours and must be refreshed after that time. The refresh token is valid for 2 weeks and for one refresh. The new refresh token is returned after each refresh.
Use https://my.ogoship.com server for token requests.
We only support form data and parameter data types (not json currently) for generating the token.
curl https://my.ogoship.com/OAuth/Token -d grant_type=password -d client_id=123456 -d client_secret=abcdef -d username=[merchantId] -d password=[secretToken] -d scope="read:order write:order read:product write:product read:webhook write:webhook read:metadata write:metadata"
Available OAuth2 scopes
The following scopes are available when requesting a token:
| Scope | Description |
|---|---|
| read:order | Read orders |
| write:order | Write orders |
| read:product | Read products |
| write:product | Write products |
| read:webhook | Read webhook subscriptions |
| write:webhook | Write webhook subscriptions |
| read:metadata | Read metadata |
| write:metadata | Write metadata |
Authentication methods
The API supports three authentication methods:
| Method | Description |
|---|---|
| OAuth2 (Password flow) | Use MerchantId as username and SecretToken as password to obtain a JWT via the token endpoint above |
| Bearer JWT | Pass the JWT in the Authorization: Bearer <token> header |
| X-OgoKey | Pass your API key directly in the X-OgoKey request header |
API endpoints
The following endpoint groups are available:
| Group | Endpoints |
|---|---|
| Orders | Search, create, update orders |
| Products | Search, add, update products |
| Stock | Search stock levels |
| StockUpdate | Add stock updates (purchase orders) |
| Returns | Search, create, update returns |
| WebHooks | List and add webhook subscriptions |
| Metadata | Get, update, delete metadata |
See the full API documentation for request/response details on each endpoint.
WebHooks
You can find webhook models in the API description. API calls will have a "X-OGOship-Hmac-SHA256" header.
It will contain body of message HMACSHA256 calculated using Webhook key. Hash is then saved to header using Base64 encoding.
C# implementation: var bytes = Encoding.UTF8.GetBytes(webhookSecretKey); var hmac = new HMACSHA256(bytes); var hashString = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(data)));
Your own Application ID and secret
You can test everything with a demo account client_id/client_secret = 123456/abcdef .
Before you wish to go live, request your own client ID & secret via email from our Tech team.
When authorizing the OGOship API in Scalar:

You can find the username & password from your myOGO merchant, under Edit Merchant --> Integrations --> API Information. 
💡
In case of any issues, please email our Tech team for assistance.