{
  "openapi": "3.0.1",
  "info": {
    "title": "cmdtyMatch API",
    "version": "3.0",
    "description": "cmdtyMatch allows producers and grain buyers to exchange commodities online.",
    "contact": {
      "name": "API Support",
      "url": "https://www.barchart.com/cmdty/trading/cmdtymatch",
      "email": "support@barchart.com"
    }
  },
  "servers": [
    {
      "url": "https://gos.agricharts.com/api/v3",
      "description": "cmdtyMatch API v3"
    },
    {
      "url": "https://gos-stage.agricharts.com/api/v3",
      "description": "cmdtyMatch API v3 Stage"
    }
  ],
  "tags": [
    {
      "name": "Authentication"
    },
    {
      "name": "Agreements"
    },
    {
      "name": "Account Management"
    },
    {
      "name": "User Actions"
    },
    {
      "name": "Validations"
    },
    {
      "name": "Elevators and Locations"
    },
    {
      "name": "Offers"
    }
  ],
  "paths": {
    "/token": {
      "post": {
        "summary": "Request Authentication",
        "tags": [
          "Authentication"
        ],
        "operationId": "post-token",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    },
                    "expires": {
                      "type": "number"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "scope": "Farmer",
                      "token": "f52ca7902ba6fa67c75b3e3ce31e34bf8d490f7e",
                      "expires": 1575666332
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Authenticate a user from a plaintext username and password. A successful authentication response provides a Authorization Token that can be used for continued API access.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "description": "application/json",
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "service": {
                    "type": "string"
                  },
                  "grainsServiceId": {
                    "type": "string"
                  },
                  "autoLogin": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "username",
                  "password"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "username": "Farmer",
                    "password": "b09346239"
                  }
                }
              }
            }
          },
          "description": "JSON data with the following keys"
        }
      }
    },
    "/token/refresh": {
      "get": {
        "summary": "Refresh an existing Authorization Token",
        "tags": [
          "Authentication"
        ],
        "responses": {
          "200": {
            "description": "The renewed token details are returned in JSON format",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "example": "Farmer"
                    },
                    "token": {
                      "type": "string"
                    },
                    "expires": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "scope",
                    "token",
                    "expires"
                  ]
                },
                "examples": {
                  "Example": {
                    "value": {
                      "scope": "Farmer",
                      "token": "b09346239e995f7807246d9909513db1dc152ba4",
                      "expires": 1490112990
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-token-refresh",
        "description": "Renew an existing Authorization Token, extending the lifespan.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ]
      }
    },
    "/users/farmer-agreement": {
      "get": {
        "summary": "Get Farmer Agreement document",
        "tags": [
          "Agreements"
        ],
        "responses": {
          "200": {
            "description": "JSON format document containing the agreements in HTML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number"
                        },
                        "description": {
                          "type": "string"
                        },
                        "numResults": {
                          "type": "number"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agreement": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": [
                        {
                          "agreement": "Agreements HTML to be displayed to the Farmer"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-users-farmer-agreement",
        "description": "Returns the current Grain Offer System Agreement document.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      },
      "put": {
        "summary": "Signing the Agreement",
        "operationId": "put-users-farmer-agreement",
        "responses": {
          "200": {
            "description": "On successful agreement signing, the cmdtyMatch user object is returned in JSON format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          }
        },
        "description": "Calling this API will mark the current authenticated user as signing the cmdtyMatch Agreement.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "tags": [
          "Agreements"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user": {
                    "type": "object",
                    "required": [
                      "gbosFarmerAgreement"
                    ],
                    "properties": {
                      "gbosFarmerAgreement": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "response-user-object"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "user": {
                      "gbosFarmerAgreement": true
                    }
                  }
                }
              }
            }
          },
          "description": "JSON data with the 'gbosFarmerAgreement' key"
        },
        "security": [
          {
            "Token": []
          }
        ]
      }
    },
    "/users/self": {
      "get": {
        "summary": "Get account details",
        "tags": [
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {}
              }
            }
          }
        },
        "operationId": "get-users-self",
        "description": "Get account details for the currently authenticated user.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ]
      },
      "put": {
        "summary": "Change details (for the authenticated user)",
        "operationId": "put-users-self",
        "description": "Change individual details on the authenticated user.",
        "security": [
          {
            "Token": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-user-object"
              },
              "examples": {
                "Example": {
                  "value": {
                    "user": {
                      "firstName": "NewFristName",
                      "lastName": "NewLastName",
                      "gbosFarmerAgreement": true
                    }
                  }
                }
              }
            }
          },
          "description": "JSON data with the keys and values you wish to change."
        },
        "tags": [
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "On successful update, the cmdtyMatch user object is returned in JSON format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      }
    },
    "/users/update-password": {
      "put": {
        "summary": "Change password (for the authenticated user)",
        "operationId": "post-users-update-password",
        "responses": {
          "200": {
            "description": "On successful password update, the cmdtyMatch user object is returned in JSON format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {}
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-400"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 400,
                        "description": "Bad Request",
                        "errors": {
                          "password": "The password confirmation does not match.",
                          "passwordConfirmation": "The password confirmation field is required."
                        },
                        "numResults": 0
                      },
                      "results": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-403"
                }
              }
            }
          }
        },
        "description": "Change the authenticated users password.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user": {
                    "type": "object",
                    "required": [
                      "email",
                      "password",
                      "passwordConfirmation"
                    ],
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "password": {
                        "type": "string"
                      },
                      "passwordConfirmation": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "response-user-object"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "user": {
                      "email": "farmer@email.com",
                      "password": "newpassword",
                      "passwordConfirmation": "newpassword"
                    }
                  }
                }
              }
            }
          },
          "description": "JSON data with the 'gbosFarmerAgreement' key"
        },
        "tags": [
          "Account Management"
        ]
      }
    },
    "/users/reset": {
      "post": {
        "summary": "Reset Password",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                }
              }
            }
          }
        },
        "operationId": "get-users-reset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "meta": {
                      "statusCode": 200,
                      "description": "Success",
                      "numResults": 1
                    },
                    "results": {
                      "message": "Success"
                    }
                  }
                }
              }
            }
          },
          "description": ""
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "description": "Triggers the Reset Password process for the account with the matching email. The user will receive an email instructing them how to change/reset their password.",
        "tags": [
          "Account Management"
        ]
      }
    },
    "/users/update-user-info": {
      "put": {
        "summary": "Change details (for the authenticated user)",
        "operationId": "put-users-update-user-info",
        "description": "Change individual details on the authenticated user.",
        "security": [
          {
            "Token": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/request-user-object"
              },
              "examples": {
                "Example": {
                  "value": {
                    "user": {
                      "firstName": "NewFristName",
                      "lastName": "NewLastName",
                      "gbosFarmerAgreement": true
                    }
                  }
                }
              }
            }
          },
          "description": "JSON data with the keys and values you wish to change."
        },
        "tags": [
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "On successful update, the cmdtyMatch user object is returned in JSON format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      }
    },
    "/users/request-elevator": {
      "post": {
        "summary": "Request Elevator approval",
        "operationId": "post-users-request-elevator",
        "responses": {
          "201": {
            "description": "On a successful approval request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "numResults": {
                          "type": "number"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {}
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Request Elevator approval for the currently authenticated Farmer. Note that the Farmer must complete the Agreement signing process for these API calls to return successfully.",
        "security": [
          {
            "Token": []
          }
        ],
        "tags": [
          "Elevators and Locations"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user": {
                    "type": "number"
                  },
                  "elevator": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "description": ""
        }
      }
    },
    "/elevators": {
      "get": {
        "summary": "Get a list of available Elevators",
        "tags": [
          "Elevators and Locations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-elevators-object"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 233
                      },
                      "results": [
                        {
                          "id": 1221,
                          "name": "Plains Center, LLC",
                          "active": false,
                          "address": "1455 82nd Street",
                          "secondAddress": null,
                          "thirdAddress": null,
                          "city": "Parkston",
                          "state": "SD",
                          "zip": "57366",
                          "phone": "123-456-7890",
                          "website": "www.plains-center-llc.com",
                          "gbosSyncBids": 1,
                          "gbosDefaultElevator": 1,
                          "terms": "",
                          "latitude": "41.292363",
                          "longitude": "-27.981223",
                          "logo": null,
                          "grainsServiceId": null,
                          "offerTypes": [
                            {
                              "id": 3,
                              "name": "Cash"
                            },
                            {
                              "id": 2,
                              "name": "Basis"
                            },
                            {
                              "id": 1,
                              "name": "Futures"
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-elevators",
        "description": "Retrieves a list of available Elevators and their available Offer Types.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      }
    },
    "/locations": {
      "get": {
        "summary": "Get a list of Locations for an Elevator",
        "tags": [
          "Elevators and Locations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-elevator-locations-object"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 3
                      },
                      "results": [
                        {
                          "id": 3470,
                          "elevator": "Prairie Creek Grain Company, Inc.",
                          "address": "29400 S. Route 53",
                          "secondAddress": null,
                          "thirdAddress": null,
                          "city": "Elwood",
                          "state": "IL",
                          "name": "Elwood",
                          "conpany": "Prairie Creek Grain Company, Inc.",
                          "offerTypes": [
                            {
                              "id": 1,
                              "name": "Cash"
                            }
                          ],
                          "commodities": [
                            {
                              "id": 14472,
                              "name": "Corn",
                              "root": "ZC",
                              "bushels": {
                                "min": 500,
                                "max": 100000,
                                "step": 500,
                                "allowOddValues": 0
                              },
                              "deliveries": [
                                {
                                  "name": "March 2017",
                                  "value": "2017-03-31",
                                  "symbol": "ZCK17",
                                  "basis": -0.17
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-locations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          },
          {
            "schema": {
              "type": "number"
            },
            "in": "query",
            "name": "elevator",
            "description": "The Elevator ID",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "default": "commodities.elevatorCommodity.bushels"
            },
            "in": "query",
            "name": "with[]",
            "description": "Get Commodity and Basis data ('with[]=commodities.elevatorCommodity.bushels')"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ],
        "description": "Retrieves a list of Locations for an Elevator. Along with general location metadata, Offer Types and Commodities are returned as requested."
      }
    },
    "/default-elevators": {
      "get": {
        "summary": "Get a list of Default Elevators",
        "tags": [
          "Elevators and Locations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number"
                        },
                        "description": {
                          "type": "string"
                        },
                        "numResults": {
                          "type": "number"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "properties": {
                              "id": {
                                "type": "number"
                              },
                              "name": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              },
                              "grainsServiceId": {
                                "type": "string"
                              },
                              "logo": {
                                "type": "string"
                              }
                            }
                          }
                        ],
                        "type": "object"
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": [
                        [
                          {
                            "id": 2294,
                            "name": "Demo Site",
                            "zip": "60640",
                            "grainsServiceId": "DSS",
                            "logo": null
                          },
                          {
                            "id": 3537,
                            "name": "Agri Demo",
                            "zip": "50323",
                            "grainsServiceId": "ADM",
                            "logo": "https://placeholder.com/wp-content/uploads/2018/10/placeholder.com-logo4.png"
                          }
                        ]
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-elevators-default",
        "description": "Retrieves a list of DEFAULT Elevators and their available Offer Types.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      },
      "parameters": []
    },
    "/users/farmer-status": {
      "put": {
        "summary": "Update the Farmer Status",
        "operationId": "put-users-farmer-status",
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request: This farmer has already been approved."
          },
          "404": {
            "description": "Not Found: User not found."
          }
        },
        "description": "Update Farmer approval status in the cmdtyMatch.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "farmer": {
                    "type": "number"
                  },
                  "action": {
                    "type": "string",
                    "default": "approve",
                    "enum": [
                      "approve",
                      "reject"
                    ]
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "farmer"
                ]
              }
            }
          },
          "description": ""
        },
        "tags": [
          "Account Management"
        ]
      }
    },
    "/users/reverify": {
      "post": {
        "summary": "Verify the User",
        "operationId": "post-users-reverify",
        "responses": {
          "200": {
            "description": "Verification email sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": {
                        "message": "Verification email sent"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found: User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                }
              }
            }
          }
        },
        "description": "Re-verify the user and send 'Verification email'.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "tags": [
          "Account Management"
        ]
      }
    },
    "/user/exists": {
      "post": {
        "summary": "Check User Exists",
        "operationId": "post-users-exists",
        "description": "Check whether a User Exists in the cmdtyMatch system.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "service": {
                    "type": "string"
                  },
                  "grainsServiceId": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  }
                },
                "required": [
                  "service",
                  "username"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "username": "farmer",
                    "service": "grainsv3",
                    "grainsServiceId": "ADM"
                  }
                }
              }
            }
          },
          "description": ""
        },
        "responses": {
          "200": {
            "description": "User Exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                }
              }
            }
          },
          "404": {
            "description": "User Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                }
              }
            }
          }
        },
        "tags": [
          "User Actions"
        ]
      },
      "parameters": []
    },
    "/users/grains-welcome-email": {
      "parameters": [],
      "put": {
        "summary": "Send Welcome email",
        "tags": [
          "User Actions"
        ],
        "responses": {
          "200": {
            "description": "Successfully sent welcome email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": {
                        "message": "Successfully sent welcome email"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-400"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-403"
                }
              }
            }
          }
        },
        "operationId": "put-users-grains-welcome-email",
        "description": "Send Welcome email.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fname": {
                    "type": "string",
                    "description": "First Name"
                  },
                  "lname": {
                    "type": "string",
                    "description": "Last Name"
                  },
                  "zip": {
                    "type": "string",
                    "description": "Location (Zip)"
                  },
                  "username": {
                    "type": "string",
                    "description": "Username"
                  },
                  "phone_cell": {
                    "type": "string",
                    "description": "Mobile Number"
                  },
                  "text_alerts": {
                    "type": "boolean",
                    "description": "Text Alerts"
                  },
                  "email_alerts": {
                    "type": "boolean",
                    "description": "Email Alerts"
                  },
                  "newsletter": {
                    "type": "boolean",
                    "description": "Newsletter"
                  },
                  "video": {
                    "type": "boolean",
                    "description": "Video Newsletter"
                  },
                  "display": {
                    "type": "string",
                    "description": "Display Settings"
                  },
                  "id": {
                    "type": "integer",
                    "description": "User ID"
                  }
                },
                "required": [
                  "fname",
                  "lname",
                  "username",
                  "phone_cell",
                  "display",
                  "id"
                ]
              }
            }
          },
          "description": ""
        }
      }
    },
    "/users/preference": {
      "put": {
        "summary": "Create/Update User Preference",
        "operationId": "put-users-preference",
        "responses": {
          "200": {
            "description": "Successfully stored preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": {
                        "message": "Successfully stored preference!"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-400"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-403"
                }
              }
            }
          }
        },
        "description": "Create or Update the user preference.",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "dashboardDateField": {
                    "type": "string"
                  },
                  "dashboardStartDate": {
                    "type": "string"
                  },
                  "dashboardEndDate": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "dashboardDateField",
                  "dashboardStartDate",
                  "dashboardEndDate"
                ]
              }
            }
          },
          "description": "JSON data with id and fields."
        },
        "tags": [
          "User Actions"
        ]
      }
    },
    "/users/sms/lookup/{phone}": {
      "get": {
        "summary": "Lookup E.164 Phone Number",
        "tags": [
          "Validations"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "e164": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean",
                      "description": "A Boolean value that indicates if the phone number is valid."
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "success": true,
                      "e164": "+13221240400"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Lookup Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 404,
                        "description": "Not Found",
                        "errors": [
                          "Lookup Failed"
                        ],
                        "numResults": 3
                      },
                      "results": {
                        "success": false,
                        "data": [],
                        "errors": "{\"message\":\"phone is not defined\"}"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-users-sms-lookup",
        "description": "Lookup and validate E.164 Phone Number (SMSValidator).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "phone",
          "in": "path",
          "required": true
        }
      ]
    },
    "/users/sms/send": {
      "post": {
        "summary": "SMS: Send validation",
        "operationId": "post-users-sms-send",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean",
                      "description": "A Boolean value that indicates if the text message was successfully transmitted to the device."
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "phone": "+1234567890",
                      "success": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Send Validation Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 404,
                        "description": "Not Found",
                        "errors": [
                          "Lookup Failed"
                        ],
                        "numResults": 3
                      },
                      "results": {
                        "success": false,
                        "data": [],
                        "errors": "{\"message\":\"phone is not defined\"}"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "The server sends a short text message, containing a 6-digit validation code, to the phone number (SMSValidator).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "system": {
                    "type": "string"
                  }
                },
                "required": [
                  "phone",
                  "system"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "phone": "123-456-7890",
                    "system": "Bob's Real Farm"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Validations"
        ]
      }
    },
    "/users/sms/confirm": {
      "put": {
        "summary": "SMS: Confirm a validation",
        "operationId": "put-users-sms-confirm",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean",
                      "description": "A Boolean value that indicates if validation code matches the code sent to the device."
                    },
                    "result": {
                      "type": "string",
                      "description": "- \"VALIDATION_SUCCESS\" - The validation code matches the code sent to the device.\n- \"VALIDATION_FAILED_UNKNOWN_PHONE\" - The system has no record of a validation code. This can happen when no validation code has been sent, or the code has already been confirmed, or too many incorrect attempts to validate the code have occurred.\n- \"VALIDATION_FAILED_WRONG_CODE\" - The validation code does not match the code sent to the device. Another attempt can be made to validate the code.\n- \"VALIDATION_FAILED_TOO_MANY_ATTEMPTS\" - The validation code does not match the code sent to the device. No further attempts can be made to validate the code, instead a new code must be generated."
                    },
                    "hmac": {
                      "type": "string",
                      "description": "The server does not store validated phone numbers. Instead, the server provides a \"hashed message authentication code\" which can be used, in conjunction with the phone number, to determine is the phone number has been previously validated."
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "phone": "123-456-7890",
                      "success": true,
                      "result": "VALIDATION_SUCCESS",
                      "hmac": "1521e4e48c08dba5d127a1b1a65843119d5577c17a03c5b8c11e2eab25a66377"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "The server confirms the validation code, providing a HMAC (hashed message authentication code) (SMSValidator).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "phone",
                  "code"
                ]
              }
            }
          }
        },
        "tags": [
          "Validations"
        ]
      }
    },
    "/users/sms/verify": {
      "put": {
        "summary": "SMS: Verify a phone",
        "operationId": "put-users-sms-verify",
        "tags": [
          "Validations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "hmac": {
                    "type": "string"
                  }
                },
                "required": [
                  "phone",
                  "hmac"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "description": "Check to see if a phone number has been validated using the phone number and HMAC (SMSValidator).",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string"
                    },
                    "hmac": {
                      "type": "string",
                      "description": "The server does not store validated phone numbers. Instead, the server provides a \"hashed message authentication code\" which can be used, in conjunction with the phone number, to determine is the phone number has been previously validated."
                    },
                    "valid": {
                      "type": "boolean",
                      "description": "A Boolean value that indicates if phone number has been previously validated."
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "phone": "123-456-7890",
                      "hmac": "94b6239ae1d309a46163bb1e2f64213170ef201fb3f99ed1908caee899a34d2b",
                      "valid": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/verify/{hash}": {
      "get": {
        "summary": "Verify User by HASH",
        "tags": [
          "User Actions",
          "Validations"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                }
              }
            }
          },
          "404": {
            "description": "No verification found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                }
              }
            }
          }
        },
        "operationId": "get-users-verify",
        "description": "Verify and Activate user by HASH.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "hash",
          "in": "path",
          "required": true
        }
      ]
    },
    "/users/verify-phone/{phone}/{code}": {
      "get": {
        "summary": "Verify user by phone",
        "tags": [
          "User Actions",
          "Validations"
        ],
        "responses": {
          "200": {
            "description": "If success, return the user info object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {
                  "Validation failed": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 2
                      },
                      "results": {
                        "success": true,
                        "data": {
                          "phone": "12313123123",
                          "result": "VALIDATION_FAILED_UNKNOWN_PHONE",
                          "success": false
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Verify by Phone Failed"
          }
        },
        "operationId": "get-users-verify-phone",
        "description": "Verify user by phone & code and activate.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "phone",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "code",
          "in": "path",
          "required": true
        }
      ]
    },
    "/users": {
      "post": {
        "summary": "Create a new User",
        "operationId": "post-users",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-400"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "status_code": 400,
                        "description": "Bad Request",
                        "errors": {
                          "elevator": "That username is already taken for the given elevator!"
                        },
                        "num_results": 0
                      },
                      "results": []
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Account Management"
        ],
        "description": "Create a new User account, confirmation will send depends on 'verifyType'.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user": {
                    "$ref": "#/components/schemas/create-user-object"
                  },
                  "service": {
                    "type": "string"
                  },
                  "grainsServiceId": {
                    "type": "string"
                  },
                  "verifyType": {
                    "type": "string",
                    "default": "EMAIL",
                    "description": "Verification type: \"TEXT\" or \"EMAIL\"",
                    "enum": [
                      "TEXT",
                      "EMAIL"
                    ]
                  },
                  "upgrade": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "user",
                  "service",
                  "grainsServiceId"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "user": {
                      "role": "11",
                      "username": "farmer@email.com",
                      "email": "farmer@email.com",
                      "company": "My Farmer Inc.",
                      "password": "mypassword",
                      "passwordConfirmation": "mypassword",
                      "firstname": "John",
                      "lastname": "Doe",
                      "street1": "123 N Main Str.",
                      "street2": "Suite 1230",
                      "street3": "",
                      "city": "Chicago",
                      "state": "IL",
                      "zip": "60601",
                      "country": "US",
                      "phoneHome": "+12345678901",
                      "phoneCell": "+12345678901",
                      "fax": "+12345678901",
                      "specialOffers": 0,
                      "newsletterOptIn": 0,
                      "weeklyGrainVideo": 0,
                      "priceFormat": "fractions"
                    },
                    "service": "grainsv3",
                    "grainsServiceId": "CHS",
                    "verifyType": "EMAIL",
                    "upgrade": false
                  }
                }
              }
            }
          },
          "description": ""
        }
      }
    },
    "/farmer/update": {
      "put": {
        "summary": "Update 'Farmer' user details",
        "tags": [
          "User Actions",
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "Farmer Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        },
        "operationId": "put-farmer-update",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ],
        "description": "Update the 'Farmer' user details.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phoneWork": {
                    "type": "string"
                  },
                  "phoneHome": {
                    "type": "string"
                  },
                  "phoneCell": {
                    "type": "string"
                  },
                  "fax": {
                    "type": "string"
                  },
                  "street1": {
                    "type": "string"
                  },
                  "street2": {
                    "type": "string"
                  },
                  "street3": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "zip": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              },
              "examples": {}
            }
          }
        }
      }
    },
    "/broker/offers": {
      "post": {
        "summary": "Get Offers by Elevator",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "numResults": {
                          "type": "string"
                        }
                      }
                    },
                    "results": {
                      "type": "object",
                      "properties": {
                        "counts": {
                          "type": "object",
                          "properties": {
                            "pending": {
                              "type": "number"
                            },
                            "working": {
                              "type": "number"
                            },
                            "matched": {
                              "type": "number"
                            }
                          }
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "garReferenceId": {
                              "type": "string"
                            },
                            "symbol": {
                              "type": "string"
                            },
                            "canBeRejected": {
                              "type": "boolean"
                            },
                            "canBeAccepted": {
                              "type": "boolean"
                            },
                            "canBeAcknowledged": {
                              "type": "boolean"
                            },
                            "distance": {
                              "type": "number"
                            },
                            "targetPrice": {
                              "type": "number"
                            },
                            "futurePrice": {
                              "type": "number"
                            },
                            "basis": {
                              "type": "number"
                            },
                            "expires": {
                              "type": "string"
                            },
                            "delivery": {
                              "type": "string"
                            },
                            "updated": {
                              "type": "string"
                            },
                            "submitted": {
                              "type": "string"
                            },
                            "bushels": {
                              "type": "number"
                            },
                            "value": {
                              "type": "number"
                            },
                            "price": {
                              "type": "number"
                            },
                            "matched": {
                              "type": "boolean"
                            },
                            "status": {
                              "type": "string"
                            },
                            "offerCommodityId": {
                              "type": "number"
                            },
                            "commodity": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "locationId": {
                              "type": "number"
                            },
                            "location": {
                              "type": "string"
                            },
                            "locationName": {
                              "type": "string"
                            },
                            "elevatorId": {
                              "type": "number"
                            },
                            "elevator": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "farmer": {
                              "type": "string"
                            },
                            "fullName": {
                              "type": "string"
                            },
                            "number": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 2
                      },
                      "results": {
                        "counts": {
                          "pending": 0,
                          "working": 0,
                          "matched": 0
                        },
                        "data": [
                          {
                            "id": 6117,
                            "number": "00006117",
                            "fullName": "John Doe",
                            "farmer": "John Doe",
                            "email": "merchandiser@email.com",
                            "phone": "--",
                            "elevator": "Agri Demo",
                            "elevatorId": 1221,
                            "locationName": "Windsor Heights East",
                            "location": "Windsor Heights",
                            "locationId": 11112,
                            "type": "Spot",
                            "commodity": "Yellow Corn",
                            "offerCommodityId": 2121,
                            "status": "Pending",
                            "matched": false,
                            "price": 89,
                            "value": 44500,
                            "bushels": 500,
                            "submitted": "04/25/2019",
                            "updated": "2019-04-25T13:29:06-05:00",
                            "delivery": "2019-04-30T12:00:00-05:00",
                            "expires": "2019-12-26T15:00:00-06:00",
                            "basis": null,
                            "futurePrice": 0,
                            "targetPrice": 89,
                            "distance": -89,
                            "canBeAcknowledged": true,
                            "canBeAccepted": true,
                            "canBeRejected": true,
                            "symbol": null,
                            "garReferenceId": "N/A"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Elevator not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-404"
                }
              }
            },
            "headers": {}
          }
        },
        "operationId": "post-broker-offers",
        "security": [
          {
            "Token": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "description": "Retrieve a list of all Offers by Elevator",
        "tags": [
          "Offers"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "elevatorId": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "PENDING",
                      "ACCEPTED",
                      "REJECTED",
                      "MODIFIED",
                      "CANCELLED",
                      "WORKING",
                      "ACKNOWLEDGED",
                      "MATCHED",
                      "EXPIRED"
                    ]
                  }
                },
                "required": [
                  "elevatorId"
                ]
              },
              "examples": {}
            }
          },
          "description": ""
        }
      }
    },
    "/elevators/admin": {
      "get": {
        "operationId": "get-elevators-admin",
        "summary": "Get Elevator",
        "description": "Get the Elevator details",
        "tags": [
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": [
                        {
                          "id": 868,
                          "sendAlertsToFarmers": true,
                          "offerTypes": [
                            {
                              "id": 1,
                              "name": "Futures",
                              "status": true
                            },
                            {
                              "id": 2,
                              "name": "Basis",
                              "status": true
                            },
                            {
                              "id": 3,
                              "name": "Cash",
                              "status": true
                            },
                            {
                              "id": 4,
                              "name": "Spot",
                              "status": true
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ]
      },
      "post": {
        "operationId": "post-elevators-admin",
        "summary": "Update Elevator",
        "description": "Update the Elevator details",
        "tags": [
          "Account Management"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-200"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": [
                        {
                          "id": 868,
                          "sendAlertsToFarmers": true,
                          "offerTypes": [
                            {
                              "id": 1,
                              "name": "Futures",
                              "status": true
                            },
                            {
                              "id": 2,
                              "name": "Basis",
                              "status": true
                            },
                            {
                              "id": 3,
                              "name": "Cash",
                              "status": true
                            },
                            {
                              "id": 4,
                              "name": "Spot",
                              "status": true
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "elevator": {
                    "type": "object",
                    "required": [
                      "sendAlertsToFarmers"
                    ],
                    "properties": {
                      "sendAlertsToFarmers": {
                        "type": "boolean"
                      },
                      "commodities": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "bushels": {
                              "type": "object",
                              "properties": {
                                "min": {
                                  "type": "number"
                                },
                                "max": {
                                  "type": "number"
                                },
                                "step": {
                                  "type": "number"
                                },
                                "allowOddValues": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      },
                      "offerTypes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "status": {
                              "type": "boolean"
                            }
                          }
                        }
                      },
                      "merchandisers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Merchandiser User Id"
                            },
                            "locations": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "required": [
                  "elevator"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "elevator": {
                      "sendAlertsToFarmers": true,
                      "commodities": [
                        {
                          "id": 7414,
                          "name": "Yellow Corn",
                          "bushels": {
                            "min": 500,
                            "max": 50000,
                            "step": 500,
                            "allowOddValues": 1
                          }
                        },
                        {
                          "id": 7415,
                          "name": "Soybeans",
                          "bushels": {
                            "min": 250,
                            "max": 100000,
                            "step": 250,
                            "allowOddValues": 1
                          },
                          "grainAccountingId": "SoyBns"
                        }
                      ],
                      "offerTypes": [
                        {
                          "id": 1,
                          "name": "Futures",
                          "status": true
                        },
                        {
                          "id": 2,
                          "name": "Basis",
                          "status": true
                        },
                        {
                          "id": 3,
                          "name": "Cash",
                          "status": true
                        },
                        {
                          "id": 4,
                          "name": "Spot",
                          "status": true
                        }
                      ]
                    },
                    "merchandisers": {
                      "id": "merchandiserUserId",
                      "locations": [
                        {
                          "id": 19663,
                          "name": "Windsor Heights East"
                        },
                        {
                          "id": 36439,
                          "name": "DSM Terminal"
                        },
                        {
                          "id": 41951,
                          "name": "Farm Services - IL"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "description": ""
        }
      }
    },
    "/offers": {
      "get": {
        "summary": "Get a list of available Offers",
        "tags": [
          "Offers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number"
                          },
                          "number": {
                            "type": "string"
                          },
                          "fullName": {
                            "type": "string"
                          },
                          "farmer": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phone": {
                            "type": "string"
                          },
                          "elevator": {
                            "type": "string"
                          },
                          "elevatorId": {
                            "type": "number"
                          },
                          "locationName": {
                            "type": "string"
                          },
                          "location": {
                            "type": "string"
                          },
                          "locationId": {
                            "type": "number"
                          },
                          "type": {
                            "type": "string"
                          },
                          "commodity": {
                            "type": "string"
                          },
                          "offerCommodityId": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string"
                          },
                          "matched": {
                            "type": "boolean"
                          },
                          "price": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          },
                          "bushels": {
                            "type": "number"
                          },
                          "submitted": {
                            "type": "string"
                          },
                          "updated": {
                            "type": "string"
                          },
                          "delivery": {
                            "type": "string"
                          },
                          "expires": {
                            "type": "string"
                          },
                          "basis": {
                            "type": "string"
                          },
                          "futurePrice": {
                            "type": "number"
                          },
                          "targetPrice": {
                            "type": "number"
                          },
                          "distance": {
                            "type": "number"
                          },
                          "canBeAcknowledged": {
                            "type": "boolean"
                          },
                          "canBeAccepted": {
                            "type": "boolean"
                          },
                          "canBeRejected": {
                            "type": "boolean"
                          },
                          "symbol": {
                            "type": "string"
                          },
                          "garReferenceId": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "numResults": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 233
                      },
                      "results": [
                        {
                          "id": 1221,
                          "name": "Plains Center, LLC",
                          "active": false,
                          "address": "1455 82nd Street",
                          "secondAddress": null,
                          "thirdAddress": null,
                          "city": "Parkston",
                          "state": "SD",
                          "zip": "57366",
                          "phone": "123-456-7890",
                          "website": "www.plains-center-llc.com",
                          "gbosSyncBids": 1,
                          "gbosDefaultElevator": 1,
                          "terms": "",
                          "latitude": "41.292363",
                          "longitude": "-27.981223",
                          "logo": null,
                          "grainsServiceId": null,
                          "offerTypes": [
                            {
                              "id": 3,
                              "name": "Cash"
                            },
                            {
                              "id": 2,
                              "name": "Basis"
                            },
                            {
                              "id": 1,
                              "name": "Futures"
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-offers",
        "description": "Retrieves a list of Offers.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "status"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "with"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "all"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "startDate"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "endDate"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateField"
          }
        ],
        "security": [
          {
            "Token": []
          }
        ]
      },
      "post": {
        "summary": "Create a new Offer",
        "operationId": "post-offers",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 201,
                        "description": "Success, created",
                        "numResults": 1
                      },
                      "results": [
                        {
                          "id": 6559,
                          "number": 6559,
                          "fullName": "Joe Farmer",
                          "farmer": "Joes Farmer",
                          "email": "joefarmer@example.com",
                          "phone": "--",
                          "elevator": "AgriCharts Elevator",
                          "elevatorId": 868,
                          "locationName": "Windsor Heights East",
                          "location": "Windsor Heights",
                          "locationId": 19663,
                          "type": "Spot",
                          "commodity": "Yellow Corn",
                          "offerCommodityId": 105381,
                          "status": "Pending",
                          "matched": false,
                          "price": 3.75,
                          "value": 1875,
                          "bushels": 500,
                          "submitted": "03/09/2020",
                          "updated": "2020-03-09T13:07:55-05:00",
                          "delivery": "2020-03-09T12:00:00-05:00",
                          "expires": "2020-03-19T15:00:00-05:00",
                          "basis": "-0.20",
                          "futurePrice": 3.7325,
                          "targetPrice": 3.95,
                          "distance": null,
                          "canBeAcknowledged": true,
                          "canBeAccepted": true,
                          "canBeRejected": true,
                          "symbol": "ZCH20",
                          "garReferenceId": "N/A"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-401"
                }
              }
            }
          }
        },
        "description": "Create a new Offer",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "required": true,
            "description": "application/json"
          }
        ],
        "tags": [
          "Offers"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "object",
                    "properties": {
                      "userId": {
                        "type": "number"
                      },
                      "offerTypeId": {
                        "type": "number"
                      },
                      "elevatorId": {
                        "type": "number"
                      },
                      "locationId": {
                        "type": "number"
                      },
                      "offerCommodityId": {
                        "type": "number"
                      },
                      "count": {
                        "type": "number"
                      },
                      "price": {
                        "type": "number"
                      },
                      "delivery": {
                        "type": "string",
                        "format": "date",
                        "example": "2020-02-20"
                      },
                      "expires": {
                        "type": "string",
                        "format": "date",
                        "example": "2020-03-20"
                      },
                      "notes": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "userId",
                      "offerTypeId",
                      "elevatorId",
                      "locationId",
                      "offerCommodityId",
                      "count",
                      "price",
                      "delivery",
                      "expires"
                    ]
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "offerTypeId": "4",
                    "userId": "161929",
                    "elevatorId": "868",
                    "locationId": "19663",
                    "offerCommodityId": "105381",
                    "count": "500",
                    "price": "3.75",
                    "delivery": "2020-03-09",
                    "expires": "2020-03-19",
                    "notes": "Optional"
                  }
                }
              }
            }
          },
          "description": "JSON data"
        },
        "security": [
          {
            "Token": []
          }
        ]
      }
    },
    "/offers/{offerId}": {
      "parameters": [
        {
          "schema": {
            "type": "number"
          },
          "name": "offerId",
          "in": "path",
          "description": "",
          "required": true
        }
      ],
      "put": {
        "summary": "Update the Offer",
        "tags": [
          "Offers"
        ],
        "operationId": "put-offers",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response-user-object"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "meta": {
                        "statusCode": 200,
                        "description": "Success",
                        "numResults": 1
                      },
                      "results": [
                        {
                          "id": 12558,
                          "number": 12558,
                          "fullName": "New Farmer",
                          "farmer": "FARMER",
                          "email": "farmer@example.com",
                          "phone": "--",
                          "elevator": "Agri Elevator",
                          "elevatorId": 1868,
                          "locationName": "Windsor Heights East",
                          "location": "Windsor Heights",
                          "locationId": 663,
                          "type": "Spot",
                          "commodity": "Yellow Corn",
                          "offerCommodityId": 381,
                          "status": "Pending",
                          "matched": false,
                          "price": 3.7,
                          "value": 3.7,
                          "bushels": 1,
                          "submitted": "03/03/2020",
                          "updated": "2020-03-09T08:03:50-05:00",
                          "delivery": "2020-03-06T12:00:00-06:00",
                          "expires": "2020-03-16T15:00:00-05:00",
                          "basis": "-0.20",
                          "futurePrice": 3.725,
                          "targetPrice": 3.95,
                          "distance": null,
                          "canBeAcknowledged": true,
                          "canBeAccepted": true,
                          "canBeRejected": true,
                          "symbol": "ZCH20",
                          "garReferenceId": "N/A"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Update the Offer ID",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "default": "application/json"
            },
            "in": "header",
            "name": "Content-Type",
            "description": "application/json",
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "\"pending\"",
                          "\"accepted\"",
                          "\"rejected\"",
                          "\"modified\"",
                          "\"cancelled\"",
                          "\"working\"",
                          "\"acknowledged\"",
                          "\"matched\"",
                          "\"expired\""
                        ]
                      },
                      "price": {
                        "type": "number"
                      },
                      "count": {
                        "type": "number"
                      },
                      "delivery": {
                        "type": "string",
                        "format": "date",
                        "example": "2020-02-20"
                      },
                      "expires": {
                        "type": "string",
                        "format": "date",
                        "example": "2020-03-20"
                      },
                      "notes": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "status",
                      "price",
                      "count",
                      "delivery"
                    ]
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "status": "pending",
                    "notes": "optional",
                    "delivery": "2020-03-06",
                    "price": "3.75",
                    "expires": "2020-03-16",
                    "count": "500"
                  }
                }
              }
            }
          },
          "description": "JSON data with the following keys"
        },
        "security": [
          {
            "Token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "response-401": {
        "title": "Response '401 Unauthorized'",
        "type": "object",
        "description": "Error response - 401 Unauthorized",
        "x-examples": {
          "Example": {
            "message": "Authentication failed.",
            "statusCode": 401
          }
        },
        "properties": {
          "statusCode": {
            "type": "number"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "response-user-object": {
        "title": "Response 'user' object",
        "type": "object",
        "description": "The 'user' response scheme",
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 200,
              "description": "Success",
              "numResults": 1
            },
            "results": [
              {
                "id": 1234556,
                "customer": 1234,
                "number": "1234556",
                "email": "farmer.name@email.com",
                "firstName": "John",
                "lastName": "Doe",
                "image": "https://secure.gravatar.com/avatar/ee15ebb03a44a715f5bdd8dfa2f74f70?s=80&amp;r=g&amp;d=retro",
                "address": "123 N Main Str.",
                "address2": "Suite 1230",
                "address3": "",
                "city": "Chicago",
                "state": "IL",
                "zip": "60601",
                "country": "US",
                "phone": "+12345678901",
                "mobile": "+12345678901",
                "fax": "+12345678901",
                "status": false,
                "active": true,
                "verified": true,
                "passwordResetFlag": false,
                "gbosFarmerAgreement": false,
                "gbosEmailAlertsEnabled": false,
                "gbosSmsAlertsEnabled": false,
                "gbosAlertWithin": 0,
                "realtimeUser": "justausername",
                "realtimePass": "justanencodedpassword",
                "specialOffers": 0,
                "newsletterOptIn": 0,
                "weeklyGrainVideo": 0,
                "priceFormat": "fractions",
                "createdAt": {
                  "date": "2019-01-01 11:22:33.000000",
                  "timezoneType": 3,
                  "timezone": "America/Chicago"
                },
                "canMakeOffers": true
              }
            ]
          }
        },
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "canMakeOffers": {
            "type": "string"
          },
          "createdAt": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string"
              },
              "timezoneType": {
                "type": "integer"
              },
              "timezone": {
                "type": "string"
              }
            }
          },
          "priceFormat": {
            "type": "string"
          },
          "weeklyGrainVideo": {
            "type": "integer"
          },
          "newsletterOptIn": {
            "type": "integer"
          },
          "specialOffers": {
            "type": "integer"
          },
          "realtimePass": {
            "type": "string"
          },
          "realtimeUser": {
            "type": "string"
          },
          "gbosAlertWithin": {
            "type": "integer"
          },
          "gbosSmsAlertsEnabled": {
            "type": "boolean"
          },
          "gbosEmailAlertsEnabled": {
            "type": "boolean"
          },
          "gbosFarmerAgreement": {
            "type": "boolean"
          },
          "passwordResetFlag": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "status": {
            "type": "boolean"
          },
          "fax": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "address3": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "customer": {
            "type": "integer"
          },
          "roles": {
            "type": "array",
            "items": {}
          }
        }
      },
      "response-200": {
        "title": "Response '200 Success'",
        "type": "object",
        "description": "Response - 200 Success",
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 200,
              "description": "Success",
              "numResults": 1
            },
            "results": {
              "message": "Success"
            }
          }
        },
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              }
            }
          },
          "results": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "response-404": {
        "title": "Response '404 Not Found'",
        "type": "object",
        "description": "Error response - 404 Not Found",
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 404,
              "description": "Not Found",
              "errors": [
                "Message..."
              ],
              "numResults": 1
            },
            "results": []
          }
        },
        "properties": {
          "results": {
            "type": "array",
            "items": {}
          },
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "response-403": {
        "title": "Response '403 Forbidden'",
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              }
            }
          },
          "results": {
            "type": "array",
            "items": {}
          }
        },
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 403,
              "description": "Forbidden",
              "numResults": 0
            },
            "results": []
          }
        },
        "description": "Error response - 403 Forbidden"
      },
      "response-400": {
        "title": "Response '400 Bad Request'",
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {}
          },
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              },
              "errors": {
                "type": "object"
              }
            }
          }
        },
        "description": "Error response - 400 Bad Request",
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 400,
              "description": "Bad Request",
              "errors": {
                "password": "The password confirmation does not match.",
                "passwordConfirmation": "The password confirmation field is required."
              },
              "numResults": 0
            },
            "results": []
          }
        }
      },
      "request-user-object": {
        "title": "Request 'user' object",
        "type": "object",
        "description": "The 'user' request scheme",
        "x-examples": {
          "Example": {
            "firstName": "John",
            "lastName": "Doe",
            "street1": "123 N Main Str.",
            "street2": "Suite 1230",
            "street3": "",
            "city": "Chicago",
            "state": "IL",
            "zip": "60601",
            "country": "US",
            "phoneHome": "+12345678901",
            "phoneCell": "+12345678901",
            "fax": "+12345678901",
            "specialOffers": 0,
            "newsletterOptIn": 0,
            "weeklyGrainVideo": 0,
            "priceFormat": "fractions"
          }
        },
        "properties": {
          "priceFormat": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "street3": {
            "type": "string"
          },
          "street2": {
            "type": "string"
          },
          "street1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phoneHome": {
            "type": "string"
          },
          "phoneCell": {
            "type": "string"
          },
          "phoneWork": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "specialOffers": {
            "type": "integer"
          },
          "newsletterOptIn": {
            "type": "integer"
          },
          "weeklyGrainVideo": {
            "type": "integer"
          }
        }
      },
      "response-elevators-object": {
        "title": "Response 'elevators' object",
        "type": "object",
        "description": "Elevators and their available Offer Types",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              }
            }
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "active": {
                  "type": "boolean"
                },
                "address": {
                  "type": "string"
                },
                "secondAddress": {
                  "type": "string"
                },
                "thirdAddress": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "zip": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "website": {
                  "type": "string"
                },
                "gbosSyncBids": {
                  "type": "number"
                },
                "gbosDefaultElevator": {
                  "type": "number"
                },
                "terms": {
                  "type": "string"
                },
                "latitude": {
                  "type": "string"
                },
                "longitude": {
                  "type": "string"
                },
                "logo": {
                  "type": "string"
                },
                "grainsServiceId": {
                  "type": "string"
                },
                "offerTypes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 200,
              "description": "Success",
              "numResults": 497
            },
            "results": [
              {
                "id": 9,
                "name": "Dakota Plains Ag Center, LLC",
                "active": false,
                "address": "41055 282nd Street",
                "secondAddress": null,
                "thirdAddress": null,
                "city": "Parkston",
                "state": "SD",
                "zip": "57366",
                "phone": "605-935-6791",
                "website": "www.dakotaplainsag.com",
                "gbosSyncBids": 1,
                "gbosDefaultElevator": 1,
                "terms": "",
                "latitude": "43.297763",
                "longitude": "-97.987523",
                "offerTypes": [
                  {
                    "id": 3,
                    "name": "Cash"
                  },
                  {
                    "id": 2,
                    "name": "Basis"
                  },
                  {
                    "id": 1,
                    "name": "Futures"
                  }
                ]
              }
            ]
          }
        }
      },
      "response-elevator-locations-object": {
        "title": "Response 'elevator-locations' object",
        "type": "object",
        "description": "A list of Elevator Locations",
        "x-examples": {
          "Example": {
            "meta": {
              "statusCode": 200,
              "description": "Success",
              "numResults": 3
            },
            "results": [
              {
                "id": 3470,
                "elevator": "Prairie Creek Grain Company, Inc. ",
                "address": "29400 S. Route 53",
                "secondAddress": null,
                "thirdAddress": null,
                "city": "Elwood",
                "state": "IL",
                "name": "Elwood",
                "company": "Prairie Creek Grain Company, Inc. ",
                "offerTypes": [
                  {
                    "id": 1,
                    "name": "Cash"
                  }
                ],
                "commodities": [
                  {
                    "id": 14472,
                    "name": "Corn",
                    "root": "ZC",
                    "bushels": {
                      "min": 500,
                      "max": 100000,
                      "step": 500,
                      "allowOddValues": 0
                    },
                    "deliveries": [
                      {
                        "name": "March 2017",
                        "value": "2017-03-31",
                        "symbol": "ZCK17",
                        "basis": -0.17
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "elevator": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                },
                "thirdAddress": {
                  "type": "string"
                },
                "secondAddress": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "company": {
                  "type": "string"
                },
                "offerTypes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                },
                "commodities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "root": {
                        "type": "string"
                      },
                      "bushels": {
                        "type": "object",
                        "properties": {
                          "min": {
                            "type": "number"
                          },
                          "max": {
                            "type": "number"
                          },
                          "step": {
                            "type": "number"
                          },
                          "allowOddValues": {
                            "type": "number"
                          }
                        }
                      },
                      "deliveries": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            },
                            "symbol": {
                              "type": "string"
                            },
                            "basis": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "numResults": {
                "type": "integer"
              }
            }
          }
        }
      },
      "create-user-object": {
        "title": "Create user object",
        "type": "object",
        "description": "The 'user' request scheme to create a new User",
        "x-examples": {
          "Example": {
            "role": "11",
            "username": "farmer@email.com",
            "email": "farmer@email.com",
            "company": "My Farmer Inc.",
            "password": "farmerpassword",
            "passwordConfirmation": "farmerpassword",
            "firstName": "John",
            "lastName": "Doe",
            "street1": "123 N Main Str.",
            "street2": "Suite 1230",
            "street3": "",
            "city": "Chicago",
            "state": "IL",
            "zip": "60601",
            "country": "US",
            "phoneHome": "+12345678901",
            "phoneCell": "+12345678901",
            "fax": "+12345678901",
            "specialOffers": 0,
            "newsletterOptIn": 0,
            "weeklyGrainVideo": 0,
            "priceFormat": "fractions"
          }
        },
        "properties": {
          "lastName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "street3": {
            "type": "string"
          },
          "street2": {
            "type": "string"
          },
          "street1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phoneHome": {
            "type": "string"
          },
          "phoneCell": {
            "type": "string"
          },
          "phoneWork": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "specialOffers": {
            "type": "integer"
          },
          "newsletterOptIn": {
            "type": "integer"
          },
          "weeklyGrainVideo": {
            "type": "integer"
          },
          "role": {
            "type": "string",
            "description": "Role ID: 11 - \"Farmer\", 12 - \"Merchandizer\""
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "passwordConfirmation": {
            "type": "string"
          },
          "priceFormat": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "Token": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header"
      }
    }
  }
}
