Farmers Edge client API
The client API from Farmers Edge — 7 operation(s) for client.
The client API from Farmers Edge — 7 operation(s) for client.
swagger: '2.0'
info:
title: FarmCommand canplug client API
termsOfService: https://www.farmcommand.com/terms-of-service
contact:
name: Product Support
email: productsupport@farmersedge.ca
version: ''
host: admin.farmcommand.com
basePath: /
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- FarmCommand Token: []
tags:
- name: client
paths:
/client/forgotpassword/:
parameters: []
post:
operationId: client_forgotpassword_create
description: ''
parameters: []
responses:
'201':
description: ''
tags:
- client
/client/password/reset/:
parameters: []
post:
operationId: client_password_reset_create
description: Send an email to change a password with a token.
parameters:
- name: data
in: body
required: true
schema:
required:
- identifier
- url
type: object
properties:
identifier:
description: The username or email of a user. Username is case sensitive.
type: string
url:
description: The url you would like used to reset the password with. /password/reset/<token> will be appended to the url passed in. eg. "https://admin.farmcommand.com"
type: string
responses:
'201':
description: ''
schema:
required:
- identifier
- url
type: object
properties:
identifier:
description: The username or email of a user. Username is case sensitive.
type: string
url:
description: The url you would like used to reset the password with. /password/reset/<token> will be appended to the url passed in. eg. "https://admin.farmcommand.com"
type: string
'404':
description: Client not found
'400':
description: Bad request
tags:
- client
/client/password/reset/change/:
parameters: []
post:
operationId: client_password_reset_change_create
description: Change a password with a token.
parameters:
- name: data
in: body
required: true
schema:
required:
- password
- token
type: object
properties:
token:
description: The token generated in the url
type: string
password:
description: The new password to change the users password to
type: string
responses:
'200':
description: Password changed successfully
'404':
description: Client not found
'400':
description: Bad request
tags:
- client
/client/selfserveclient/:
parameters: []
post:
operationId: client_selfserveclient_create
summary: Create a new Self Serve Client
description: Create a new self-serve client.
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/SelfServeClient'
- name: token-login
in: query
description: Logs the user in and returns a token if set to true
type: boolean
responses:
'201':
description: Self Serve Client created
schema:
$ref: '#/definitions/SelfServeClientResponse'
'400':
description: Bad Request
'429':
description: Too Many Requests
tags:
- client
/client/selfserveclient/resend-verification-email:
parameters: []
post:
operationId: client_selfserveclient_resend-verification-email_create
description: Resend a verification email to a self-serve client.
parameters:
- name: data
in: body
required: true
schema:
required:
- email
type: object
properties:
email:
description: Email of the Self Serve Client
type: string
responses:
'200':
description: Verification email sent successfully
'400':
description: Bad request
'404':
description: Self Serve Client not found
tags:
- client
/client/selfserveclient/verify:
parameters: []
post:
operationId: client_selfserveclient_verify_create
description: Verify a self-serve client with a valid token.
parameters:
- name: data
in: body
required: true
schema:
required:
- token
type: object
properties:
token:
description: The token sent in the verification email
type: string
responses:
'200':
description: Self Serve Client verified successfully
'400':
description: Bad request
'404':
description: Self Serve Client not found
tags:
- client
/client/validate-username:
parameters: []
get:
operationId: client_validate-username_list
description: Validate the availability of a username.
parameters:
- name: username
in: query
description: The username to check for availability.
type: string
responses:
'200':
description: Username validated successfully.
schema:
type: object
properties:
available:
description: True if the specified username is valid and currently available, otherwise returns with error.
type: boolean
'400':
description: Bad Request.
tags:
- client
definitions:
SelfServeClient:
required:
- username
- password
- first_name
- last_name
- email
- company_name
- phone
- postal_or_zip_code
- country
- client_type
type: object
properties:
id:
title: Id
type: integer
readOnly: true
user:
title: User
type: integer
username:
title: Username
type: string
minLength: 1
password:
title: Password
type: string
minLength: 1
first_name:
title: First name
type: string
minLength: 1
last_name:
title: Last name
type: string
minLength: 1
email:
title: Email
type: string
format: email
minLength: 1
product_name:
title: Product name
type: string
minLength: 1
company_name:
title: Company name
type: string
maxLength: 100
minLength: 1
partner:
title: Partner
type: string
enum:
- nsp
x-nullable: true
phone:
title: Phone
type: string
maxLength: 15
minLength: 1
address_line1:
title: Address line1
type: string
maxLength: 500
x-nullable: true
address_line2:
title: Address line2
type: string
maxLength: 500
x-nullable: true
city:
title: City
type: string
maxLength: 120
x-nullable: true
province_state:
title: Province state
type: string
maxLength: 100
x-nullable: true
postal_or_zip_code:
title: Postal or zip code
type: string
maxLength: 25
minLength: 1
country:
title: Country
type: string
enum:
- Canada
- USA
- Brazil
verified:
title: Verified
type: boolean
last_verification_email_sent:
title: Last verification email sent
type: string
format: date-time
readOnly: true
client_type:
title: Client type
type: string
enum:
- Grower
- Retailer
payment_session_id:
title: Payment session id
type: string
readOnly: true
minLength: 1
client_secret:
title: Client secret
type: string
readOnly: true
minLength: 1
payment_session_status:
title: Payment session status
type: string
enum:
- open
- complete
- expired
readOnly: true
eula_version:
title: Eula version
type: string
format: date
x-nullable: true
eula_date_signed:
title: Eula date signed
type: string
format: date-time
readOnly: true
crm_id:
title: Crm id
type: string
created_datetime:
title: Created datetime
type: string
format: date-time
readOnly: true
updated_datetime:
title: Updated datetime
type: string
format: date-time
readOnly: true
client:
title: Client
type: integer
x-nullable: true
service_offering:
title: Service offering
type: integer
readOnly: true
created_by:
title: Created by
type: integer
readOnly: true
last_updated_by:
title: Last updated by
type: integer
readOnly: true
SelfServeClientResponse:
required:
- username
- email
- first_name
- last_name
- company_name
- phone
- postal_or_zip_code
- country
- client_type
- user
type: object
properties:
id:
title: ID
type: integer
readOnly: true
username:
title: Username
type: string
minLength: 1
email:
title: Email
type: string
format: email
minLength: 1
first_name:
title: First name
type: string
minLength: 1
last_name:
title: Last name
type: string
minLength: 1
company_name:
title: Company name
type: string
maxLength: 100
minLength: 1
partner:
title: Partner
type: string
enum:
- nsp
x-nullable: true
phone:
title: Phone
type: string
maxLength: 15
minLength: 1
address_line1:
title: Address line1
type: string
maxLength: 500
x-nullable: true
address_line2:
title: Address line2
type: string
maxLength: 500
x-nullable: true
city:
title: City
type: string
maxLength: 120
x-nullable: true
province_state:
title: Province state
type: string
maxLength: 100
x-nullable: true
postal_or_zip_code:
title: Postal or zip code
type: string
maxLength: 25
minLength: 1
country:
title: Country
type: string
enum:
- Canada
- USA
- Brazil
verified:
title: Verified
type: boolean
last_verification_email_sent:
title: Last verification email sent
type: string
format: date-time
x-nullable: true
client_type:
title: Client type
type: string
enum:
- Grower
- Retailer
payment_session_id:
title: Payment session id
type: string
maxLength: 256
client_secret:
title: Client secret
type: string
maxLength: 512
payment_session_status:
title: Payment session status
type: string
enum:
- open
- complete
- expired
eula_version:
title: Eula version
type: string
format: date
x-nullable: true
eula_date_signed:
title: Eula date signed
type: string
format: date-time
crm_id:
title: Crm id
type: string
created_datetime:
title: Created datetime
type: string
format: date-time
readOnly: true
updated_datetime:
title: Updated datetime
type: string
format: date-time
readOnly: true
client:
title: Client
type: integer
x-nullable: true
user:
title: User
type: integer
service_offering:
title: Service offering
type: integer
x-nullable: true
created_by:
title: Created by
type: integer
x-nullable: true
last_updated_by:
title: Last updated by
type: integer
x-nullable: true
securityDefinitions:
FarmCommand Token:
type: apiKey
name: token
in: query