Skip to content

Instantly share code, notes, and snippets.

@attentive
Last active October 4, 2019 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save attentive/ee6dcfe342a69119f951a4bb09e4b2b4 to your computer and use it in GitHub Desktop.
Save attentive/ee6dcfe342a69119f951a4bb09e4b2b4 to your computer and use it in GitHub Desktop.
EML Data Services Swagger
{
"swagger": "2.0",
"info": {
"description": "This is a partial Swagger representation of the EML Data Services API documentation version 1.0 that will be used to generate a .NET client. See https://developer.emerchants.com.au/paywith/eml.v1.html# for vendor documentation.",
"version": "1.0",
"title": "EML Data Services API",
"contact": {
"email": "tom.lynch@radicalsystems.com.au"
}
},
"host": "beta.wsmerchants.com.au",
"basePath": "/3.0",
"tags": [
{
"name": "token",
"description": "Obtain OAuth 2.0 access token"
},
{
"name": "accounts",
"description": "Manage EML accounts"
}
],
"schemes": [
"https"
],
"paths": {
"/token": {
"get": {
"tags": [
"token"
],
"summary": "Obtain an access token for the EML Data Services API",
"description": "",
"operationId": "getToken",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Token request including grant_type value client_credentials",
"required": true,
"schema": {
"$ref": "#/definitions/GrantRequest"
}
}
],
"responses": {
"401": {
"description": "Forbidden"
},
"405": {
"description": "Invalid input"
}
}
}
},
"/accounts": {
"post": {
"tags": [
"accounts"
],
"summary": "Create a new EML account",
"description": "",
"operationId": "createAccount",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Account request including registration data",
"required": true,
"schema": {
"$ref": "#/definitions/CreateAccountRequest"
}
}
],
"responses": {
"401": {
"description": "Forbidden"
},
"405": {
"description": "Invalid input"
}
},
"security": [
{
"access_token": [
"write:eml"
]
}
]
}
},
"/accounts/{id}/status": {
"put": {
"tags": [
"accounts"
],
"summary": "Update the status of an EML account",
"description": "",
"operationId": "updateAccountStatus",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of account on which to update status",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "body",
"name": "body",
"description": "Account request including registration data",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAccountStatusRequest"
}
}
],
"responses": {
"401": {
"description": "Forbidden"
},
"405": {
"description": "Invalid input"
}
},
"security": [
{
"access_token": [
"write:eml"
]
}
]
}
}
},
"securityDefinitions": {
"access_token": {
"type": "oauth2",
"authorizationUrl": "https://beta.wsmerchants.com.au/3.0/token",
"tokenUrl": "https://beta.wsmerchants.com.au/3.0/token",
"flow": "accessCode",
"scopes": {
"write:eml": "update values in EML"
}
}
},
"definitions": {
"GrantRequest": {
"type": "object",
"required": [
"grant_type"
],
"properties": {
"grant_type": {
"type": "string",
"description": "Grant Type",
"enum": [
"client_credentials"
]
}
}
},
"CreateAccountRequest": {
"type": "object",
"required": [
"grant_type"
],
"properties": {
"grant_type": {
"type": "string",
"description": "Grant Type",
"enum": [
"client_credentials"
]
}
}
},
"UpdateAccountStatusRequest": {
"type": "object",
"required": [
"grant_type"
],
"properties": {
"grant_type": {
"type": "string",
"description": "Grant Type",
"enum": [
"client_credentials"
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment