Green Screens AI Pricing API

Pricing service v1 View separately Try it in swagger

OpenAPI Specification

green-screens-ai-pricing-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Triumph Intelligence Connect Analytics Pricing API
  x-logo:
    url: https://static.greenscreens.ai/main-logo.svg
    backgroundColor: '#fafafa'
    altText: Triumph Intelligence
  description: "# Authentication\n\n\nTriumph Intelligence API offers OAuth2 Bearer JWT token based authentication.\n\n\nOAuth2 - an open protocol to allow secure authorization in a simple \nand standard method from web, mobile and desktop applications.\n\n\n# \n\n\n# \n\n\n# Direct link integration with Triumph Intelligence\n\nOne of the simplest ways to integrate Triumph Intelligence in to your app is by using the \ndirect link method.\n\nLink format:\n\n    https://intelligence.triumph.io/rates?originZip={}&destinationZip={}&transportType={}\n\n* originZip - 5 digit USA ZIP code of the origin point\n\n* destinationZip - 5 digit USA ZIP code of the destination point\n\n* transportType - one of supported equipment types VAN, REEFER or FLATBED\n\n* OPTIONAL: pickupDate - pickup date string in ISO format e.g. \"2022-04-06T08:00:00.000+03:00\" when not encoded\n\n* OPTIONAL: originCityState - city and state separated by a space symbol, signifying the origin point. \nCan be used instead of originZip if you do not have a zip code of the location. \n_Should not be used together with originZip._\n\n* OPTIONAL: destinationCityState - city and state separated by a space, signifying the destination point. \nCan be used instead of destinationZip if you do not have a zip code of the location. \n_Should not be used together with destinationZip._\n\n* OPTIONAL: customer - name of the customer company\n\n* OPTIONAL: commodity - description of the transported commodity\n\n* OPTIONAL: weight - weight of the load in lbs\n\n* OPTIONAL: deliveryDate - delivery date string in ISO format e.g. \"2022-04-06T08:00:00.000+03:00\" when not encoded\n\n* OPTIONAL: extraStops - any extra stops between origin and destination. Value is an array of strings with up to 10 elements\nin the format of `{order}_{type}_{country}_{address}` \ntypes are `{numbers 0-9}_{CITY or ZIP}_{US or CA}_{if ZIP then 5+ digits, if CITY then city state string separated by space}`\n\nExamples (don't forget to encode the url):\n\n    https://intelligence.triumph.io/rates?originZip=12345&destinationZip=62345&transportType=VAN\n\n    https://intelligence.triumph.io/rates?originCityState=Wausau%20WI&destinationCityState=Evansville%20IN&transportType=VAN\n\n    https://intelligence.triumph.io/rates?originZip=12345&destinationCityState=Evansville%20IN&transportType=VAN\n\n    https://intelligence.triumph.io/rates?originZip=12345&destinationZip=62345&extraStops=0_ZIP_US_28086&extraStops=1_CITY_US_Portland%20OR&transportType=VAN\n\nExample usage:\n\n    <button\n      onclick=\"location.href='https://intelligence.triumph.io/rates?destinationZip=62345&originZip=12345&transportType=VAN'\"\n      type=\"button\">Quote new lane\n    <button>\n\n\n# \n\n\n# \n\n\n# Services and endpoints\n\nThe most versatile (and involving the most work) way of integration is by using our API directly.\nBelow you can find a list of servises and endpoints available for usage.\n"
  version: 1.3.3
  termsOfService: https://triumph.io/terms-of-service/
  contact:
    name: API Support
    email: support@greenscreens.ai
    url: https://connect.intelligence.triumph.io
tags:
- name: Pricing
  description: 'Pricing service v1


    <a href="/pricing/v1/redoc/" target="_blank">View separately</a>


    <a href="/pricing/v1/swagger/index.html" target="_blank">Try it in swagger</a>'
  x-displayName: Pricing
paths:
  /pricing/priority-rules:
    servers:
    - url: https://testapi.greenscreens.ai/v1
      description: Testing server (dev environment)
    - url: https://sandboxapi.greenscreens.ai/v1
      description: Sandbox server (as stable as production, but has no data)
    - url: https://api.greenscreens.ai/v1
      description: Production server (uses live data)
    post:
      tags:
      - Pricing
      summary: Create a priority rule
      description: Create a priority rule
      operationId: pricingPriorityRulesCreate
      security:
      - Pricing_bearerAuth: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricing_PricingPriorityRuleRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_PriorityRule'
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          $ref: '#/paths/~1pricing~1priority-rules/get/responses/403'
        '422':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/422'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/priority-rules',\n  headers: {\n    'content-type': 'application/json',\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n  },\n  body: {\n    name: 'Customer`s rule',\n    priority: 3,\n    active: false,\n    conditions: {\n      commodity: ['Apples'],\n      confidenceLevel: {from: 50, to: 250},\n      customers: ['LTR and Co', 'CocaCola', 'Walmart'],\n      lanes: [\n        {\n          origins: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ],\n          destinations: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ]\n        }\n      ],\n      lengthOfHaul: {from: 50, to: 250},\n      matchingTime: {from: 20, to: 30},\n      transitTime: {from: 20, to: 30},\n      transportTypes: ['VAN'],\n      users: ['string'],\n      weight: {from: 50, to: 250},\n      stopsCount: {from: 50, to: 250},\n      mileageDifference: {from: 50, to: 250}\n    },\n    effects: {\n      percentageAdjustment: {percentage: 15},\n      flatAdjustment: {amount: 15, currency: 'USD'},\n      setSellCost: {amount: 15, currency: 'USD'}\n    },\n    pricingTypeGroup: 'SPOT'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: "import requests\n\nurl = \"https://testapi.greenscreens.ai/v1/pricing/priority-rules\"\n\npayload = {\n    \"name\": \"Customer`s rule\",\n    \"priority\": 3,\n    \"active\": False,\n    \"conditions\": {\n        \"commodity\": [\"Apples\"],\n        \"confidenceLevel\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"customers\": [\"LTR and Co\", \"CocaCola\", \"Walmart\"],\n        \"lanes\": [\n            {\n                \"origins\": [\n                    {\"type\": \"ANYWHERE\"},\n                    {\n                        \"type\": \"STATE\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\"\n                    },\n                    {\n                        \"type\": \"CITY\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\",\n                        \"city\": \"Chicago\"\n                    },\n                    {\n                        \"type\": \"MARKET\",\n                        \"country\": \"US\",\n                        \"marketCode\": \"NY_ALB\"\n                    }\n                ],\n                \"destinations\": [\n                    {\"type\": \"ANYWHERE\"},\n                    {\n                        \"type\": \"STATE\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\"\n                    },\n                    {\n                        \"type\": \"CITY\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\",\n                        \"city\": \"Chicago\"\n                    },\n                    {\n                        \"type\": \"MARKET\",\n                        \"country\": \"US\",\n                        \"marketCode\": \"NY_ALB\"\n                    }\n                ]\n            }\n        ],\n        \"lengthOfHaul\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"matchingTime\": {\n            \"from\": 20,\n            \"to\": 30\n        },\n        \"transitTime\": {\n            \"from\": 20,\n            \"to\": 30\n        },\n        \"transportTypes\": [\"VAN\"],\n        \"users\": [\"string\"],\n        \"weight\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"stopsCount\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"mileageDifference\": {\n            \"from\": 50,\n            \"to\": 250\n        }\n    },\n    \"effects\": {\n        \"percentageAdjustment\": {\"percentage\": 15},\n        \"flatAdjustment\": {\n            \"amount\": 15,\n            \"currency\": \"USD\"\n        },\n        \"setSellCost\": {\n            \"amount\": 15,\n            \"currency\": \"USD\"\n        }\n    },\n    \"pricingTypeGroup\": \"SPOT\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://testapi.greenscreens.ai/v1/pricing/priority-rules\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"name\\\":\\\"Customer`s rule\\\",\\\"priority\\\":3,\\\"active\\\":false,\\\"conditions\\\":{\\\"commodity\\\":[\\\"Apples\\\"],\\\"confidenceLevel\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"customers\\\":[\\\"LTR and Co\\\",\\\"CocaCola\\\",\\\"Walmart\\\"],\\\"lanes\\\":[{\\\"origins\\\":[{\\\"type\\\":\\\"ANYWHERE\\\"},{\\\"type\\\":\\\"STATE\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\"},{\\\"type\\\":\\\"CITY\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\",\\\"city\\\":\\\"Chicago\\\"},{\\\"type\\\":\\\"MARKET\\\",\\\"country\\\":\\\"US\\\",\\\"marketCode\\\":\\\"NY_ALB\\\"}],\\\"destinations\\\":[{\\\"type\\\":\\\"ANYWHERE\\\"},{\\\"type\\\":\\\"STATE\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\"},{\\\"type\\\":\\\"CITY\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\",\\\"city\\\":\\\"Chicago\\\"},{\\\"type\\\":\\\"MARKET\\\",\\\"country\\\":\\\"US\\\",\\\"marketCode\\\":\\\"NY_ALB\\\"}]}],\\\"lengthOfHaul\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"matchingTime\\\":{\\\"from\\\":20,\\\"to\\\":30},\\\"transitTime\\\":{\\\"from\\\":20,\\\"to\\\":30},\\\"transportTypes\\\":[\\\"VAN\\\"],\\\"users\\\":[\\\"string\\\"],\\\"weight\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"stopsCount\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"mileageDifference\\\":{\\\"from\\\":50,\\\"to\\\":250}},\\\"effects\\\":{\\\"percentageAdjustment\\\":{\\\"percentage\\\":15},\\\"flatAdjustment\\\":{\\\"amount\\\":15,\\\"currency\\\":\\\"USD\\\"},\\\"setSellCost\\\":{\\\"amount\\\":15,\\\"currency\\\":\\\"USD\\\"}},\\\"pricingTypeGroup\\\":\\\"SPOT\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
    get:
      tags:
      - Pricing
      summary: Get priority rules
      description: Get priority rules
      operationId: pricingPriorityRulesGetAll
      security:
      - Pricing_bearerAuth: []
      parameters:
      - in: query
        name: pricingTypeGroup
        schema:
          type: string
          description: Pricing rule group filter. If not specified, all rules are returned.
          enum:
          - SPOT
          - CONTRACT
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_PricingPriorityRulesResponse'
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_Error'
              examples:
                error403Example:
                  value:
                    code: access_forbidden
                    message: Access is forbidden
        '404':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/404'
        '422':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/422'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/priority-rules',\n  qs: {pricingTypeGroup: 'SOME_STRING_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: 'import requests


          url = "https://testapi.greenscreens.ai/v1/pricing/priority-rules"


          querystring = {"pricingTypeGroup":"SOME_STRING_VALUE"}


          headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


          response = requests.request("GET", url, headers=headers, params=querystring)


          print(response.text)'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://testapi.greenscreens.ai/v1/pricing/priority-rules?pricingTypeGroup=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
  /pricing/priority-rules/{ruleId}:
    servers:
    - url: https://testapi.greenscreens.ai/v1
      description: Testing server (dev environment)
    - url: https://sandboxapi.greenscreens.ai/v1
      description: Sandbox server (as stable as production, but has no data)
    - url: https://api.greenscreens.ai/v1
      description: Production server (uses live data)
    get:
      tags:
      - Pricing
      summary: Get a priority rule
      description: Get a priority rule
      operationId: pricingPriorityRuleGet
      security:
      - Pricing_bearerAuth: []
      parameters:
      - in: path
        name: ruleId
        description: Id of the priority rule to get
        schema:
          type: integer
          format: int64
          example: 12345
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_PriorityRule'
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          $ref: '#/paths/~1pricing~1priority-rules/get/responses/403'
        '404':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/404'
        '422':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/422'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: 'import requests


          url = "https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D"


          headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


          response = requests.request("GET", url, headers=headers)


          print(response.text)'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
    put:
      tags:
      - Pricing
      summary: Update a priority rule
      description: Update a priority rule
      operationId: pricingPriorityRuleUpdate
      security:
      - Pricing_bearerAuth: []
      parameters:
      - in: path
        name: ruleId
        description: Id of the priority rule to update
        required: true
        schema:
          type: integer
          format: int64
          example: 12345
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricing_PricingPriorityRuleRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_PriorityRule'
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          $ref: '#/paths/~1pricing~1priority-rules/get/responses/403'
        '404':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/404'
        '422':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/422'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D',\n  headers: {\n    'content-type': 'application/json',\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n  },\n  body: {\n    name: 'Customer`s rule',\n    priority: 3,\n    active: false,\n    conditions: {\n      commodity: ['Apples'],\n      confidenceLevel: {from: 50, to: 250},\n      customers: ['LTR and Co', 'CocaCola', 'Walmart'],\n      lanes: [\n        {\n          origins: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ],\n          destinations: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ]\n        }\n      ],\n      lengthOfHaul: {from: 50, to: 250},\n      matchingTime: {from: 20, to: 30},\n      transitTime: {from: 20, to: 30},\n      transportTypes: ['VAN'],\n      users: ['string'],\n      weight: {from: 50, to: 250},\n      stopsCount: {from: 50, to: 250},\n      mileageDifference: {from: 50, to: 250}\n    },\n    effects: {\n      percentageAdjustment: {percentage: 15},\n      flatAdjustment: {amount: 15, currency: 'USD'},\n      setSellCost: {amount: 15, currency: 'USD'}\n    },\n    pricingTypeGroup: 'SPOT'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: "import requests\n\nurl = \"https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D\"\n\npayload = {\n    \"name\": \"Customer`s rule\",\n    \"priority\": 3,\n    \"active\": False,\n    \"conditions\": {\n        \"commodity\": [\"Apples\"],\n        \"confidenceLevel\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"customers\": [\"LTR and Co\", \"CocaCola\", \"Walmart\"],\n        \"lanes\": [\n            {\n                \"origins\": [\n                    {\"type\": \"ANYWHERE\"},\n                    {\n                        \"type\": \"STATE\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\"\n                    },\n                    {\n                        \"type\": \"CITY\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\",\n                        \"city\": \"Chicago\"\n                    },\n                    {\n                        \"type\": \"MARKET\",\n                        \"country\": \"US\",\n                        \"marketCode\": \"NY_ALB\"\n                    }\n                ],\n                \"destinations\": [\n                    {\"type\": \"ANYWHERE\"},\n                    {\n                        \"type\": \"STATE\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\"\n                    },\n                    {\n                        \"type\": \"CITY\",\n                        \"country\": \"US\",\n                        \"state\": \"IL\",\n                        \"city\": \"Chicago\"\n                    },\n                    {\n                        \"type\": \"MARKET\",\n                        \"country\": \"US\",\n                        \"marketCode\": \"NY_ALB\"\n                    }\n                ]\n            }\n        ],\n        \"lengthOfHaul\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"matchingTime\": {\n            \"from\": 20,\n            \"to\": 30\n        },\n        \"transitTime\": {\n            \"from\": 20,\n            \"to\": 30\n        },\n        \"transportTypes\": [\"VAN\"],\n        \"users\": [\"string\"],\n        \"weight\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"stopsCount\": {\n            \"from\": 50,\n            \"to\": 250\n        },\n        \"mileageDifference\": {\n            \"from\": 50,\n            \"to\": 250\n        }\n    },\n    \"effects\": {\n        \"percentageAdjustment\": {\"percentage\": 15},\n        \"flatAdjustment\": {\n            \"amount\": 15,\n            \"currency\": \"USD\"\n        },\n        \"setSellCost\": {\n            \"amount\": 15,\n            \"currency\": \"USD\"\n        }\n    },\n    \"pricingTypeGroup\": \"SPOT\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\\"name\\\":\\\"Customer`s rule\\\",\\\"priority\\\":3,\\\"active\\\":false,\\\"conditions\\\":{\\\"commodity\\\":[\\\"Apples\\\"],\\\"confidenceLevel\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"customers\\\":[\\\"LTR and Co\\\",\\\"CocaCola\\\",\\\"Walmart\\\"],\\\"lanes\\\":[{\\\"origins\\\":[{\\\"type\\\":\\\"ANYWHERE\\\"},{\\\"type\\\":\\\"STATE\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\"},{\\\"type\\\":\\\"CITY\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\",\\\"city\\\":\\\"Chicago\\\"},{\\\"type\\\":\\\"MARKET\\\",\\\"country\\\":\\\"US\\\",\\\"marketCode\\\":\\\"NY_ALB\\\"}],\\\"destinations\\\":[{\\\"type\\\":\\\"ANYWHERE\\\"},{\\\"type\\\":\\\"STATE\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\"},{\\\"type\\\":\\\"CITY\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"IL\\\",\\\"city\\\":\\\"Chicago\\\"},{\\\"type\\\":\\\"MARKET\\\",\\\"country\\\":\\\"US\\\",\\\"marketCode\\\":\\\"NY_ALB\\\"}]}],\\\"lengthOfHaul\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"matchingTime\\\":{\\\"from\\\":20,\\\"to\\\":30},\\\"transitTime\\\":{\\\"from\\\":20,\\\"to\\\":30},\\\"transportTypes\\\":[\\\"VAN\\\"],\\\"users\\\":[\\\"string\\\"],\\\"weight\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"stopsCount\\\":{\\\"from\\\":50,\\\"to\\\":250},\\\"mileageDifference\\\":{\\\"from\\\":50,\\\"to\\\":250}},\\\"effects\\\":{\\\"percentageAdjustment\\\":{\\\"percentage\\\":15},\\\"flatAdjustment\\\":{\\\"amount\\\":15,\\\"currency\\\":\\\"USD\\\"},\\\"setSellCost\\\":{\\\"amount\\\":15,\\\"currency\\\":\\\"USD\\\"}},\\\"pricingTypeGroup\\\":\\\"SPOT\\\"}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
    delete:
      tags:
      - Pricing
      summary: Delete a priority rule
      description: Delete a priority rule
      operationId: pricingPriorityRuleDelete
      security:
      - Pricing_bearerAuth: []
      parameters:
      - in: path
        name: ruleId
        description: Id of the priority rule to delete
        schema:
          type: integer
          format: int64
          example: 12345
        required: true
      responses:
        '204':
          description: Success
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          $ref: '#/paths/~1pricing~1priority-rules/get/responses/403'
        '404':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/404'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: 'import requests


          url = "https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D"


          headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


          response = requests.request("DELETE", url, headers=headers)


          print(response.text)'
      - lang: Php + Curl
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://testapi.greenscreens.ai/v1/pricing/priority-rules/%7BruleId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Bearer REPLACE_BEARER_TOKEN\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
  /pricing/combination-rules:
    servers:
    - url: https://testapi.greenscreens.ai/v1
      description: Testing server (dev environment)
    - url: https://sandboxapi.greenscreens.ai/v1
      description: Sandbox server (as stable as production, but has no data)
    - url: https://api.greenscreens.ai/v1
      description: Production server (uses live data)
    post:
      tags:
      - Pricing
      summary: Create a combination rule
      description: Create a combination rule
      operationId: pricingCombinationRuleCreate
      security:
      - Pricing_bearerAuth: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricing_PricingCombinationRuleRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricing_CombinationRule'
        '400':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/400'
        '401':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/401'
        '403':
          $ref: '#/paths/~1pricing~1priority-rules/get/responses/403'
        '422':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/422'
        '429':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/429'
        '500':
          $ref: '#/paths/~1pricing~1tpl-pricing/post/responses/500'
      x-codeSamples:
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://testapi.greenscreens.ai/v1/pricing/combination-rules',\n  headers: {\n    'content-type': 'application/json',\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN'\n  },\n  body: {\n    name: 'Customer`s rule',\n    active: false,\n    conditions: {\n      commodity: ['Apples'],\n      confidenceLevel: {from: 50, to: 250},\n      customers: ['LTR and Co', 'CocaCola', 'Walmart'],\n      lanes: [\n        {\n          origins: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ],\n          destinations: [\n            {type: 'ANYWHERE'},\n            {type: 'STATE', country: 'US', state: 'IL'},\n            {type: 'CITY', country: 'US', state: 'IL', city: 'Chicago'},\n            {type: 'MARKET', country: 'US', marketCode: 'NY_ALB'}\n          ]\n        }\n      ],\n      lengthOfHaul: {from: 50, to: 250},\n      matchingTime: {from: 20, to: 30},\n      transitTime: {from: 20, to: 30},\n      transportTypes: ['VAN'],\n      users: ['string'],\n      weight: {from: 50, to: 250},\n      stopsCount: {from: 50, to: 250},\n      mileageDifference: {from: 50, to: 250}\n    },\n    effects: {\n      percentageAdjustment: {percentage: 15},\n      flatAdjustment: {amount: 15, currency: 'USD'}\n    },\n    pricingTypeGroup: 'SPOT'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Python + Requests
        source: "import requests\n\nurl = \"https://testapi.greenscreens.ai/v1/pricing/combination-rules\"\n\npayload = {\n    \"name\": \"Customer`s ru

# --- truncated at 32 KB (106 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/green-screens-ai/refs/heads/main/openapi/green-screens-ai-pricing-api-openapi.yml