Homepage

Partner Portal API

Last edit: Mar 05, 2020

This documentation will help you manage your instances programmatically using Partner Portal API.

POST /api/authenticate

Request

Params


          {"email":"user@example.com","password":"valid password"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -d '{"email":"user@example.com","password":"valid password"}' "https://partners.platformos.com/api/authenticate"
      

Response [200]

Body

{"auth_token":"[[auth_token]]","expires_at":"2004-11-25T01:04:44Z"}
      

Request

Params


          {"email":"user@example.com","password":"INVALID PASSWORD"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -d '{"email":"user@example.com","password":"INVALID PASSWORD"}' "https://partners.platformos.com/api/authenticate"
      

Response [401]

Body

-
      

POST /api/tasks/billing/instance_billing_plan_type/archive

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/archive"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/archive"
      

Response [422]

Body

{"errors":["This Plan Type is already ARCHIVED."]}
      

POST /api/tasks/billing/instance_billing_plan_type/destroy

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/destroy"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/destroy"
      

Response [422]

Body

{"errors":["Only DRAFT Plan Types can be deleted. This Plan Type is PUBLISHED."]}
      

POST /api/tasks/billing/instance_billing_plan_type/create_child

Request

Params


          {"parent_plan_type_id":"[[parent_plan_type_id]]","partner_id":"[[partner_id]]","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"parent_plan_type_id":"[[parent_plan_type_id]]","partner_id":"[[partner_id]]","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/create_child"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"parent_plan_type_id":"[[parent_plan_type_id]]","partner_id":"[[partner_id]]","plan_type_params":{"endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"parent_plan_type_id":"[[parent_plan_type_id]]","partner_id":"[[partner_id]]","plan_type_params":{"endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/create_child"
      

Response [422]

Body

{"errors":["Name can't be blank"]}
      

POST /api/tasks/billing/instance_billing_plan_type/publish

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/publish"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"plan_type_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/publish"
      

Response [422]

Body

{"errors":["Only DRAFT Plan Types can be published. This Plan Type is PUBLISHED."]}
      

POST /api/tasks/billing/instance_billing_plan_type/update_child

Request

Params


          {"plan_type_id":"9999","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"name":"[[name]]","price_cents":"9999"},{"name":"[[name]]","price_cents":"9999"}]}}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/update_child"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"plan_type_id":"9999","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"price_cents":"9999","name":"[[name]]"},{"price_cents":"9999"}]}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"plan_type_id":"9999","plan_type_params":{"name":"[[name]]","endpoint_ids":["9999"],"instance_usage_fees":[{"price_cents":"9999","name":"[[name]]"},{"price_cents":"9999"}]}}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_type/update_child"
      

Response [422]

Body

{"errors":["Usage fees are invalid"]}
      

POST /api/tasks/billing/instance_billing_plan_types_partners_policy/create

Request

Params


          {"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"charged_by"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"charged_by"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_types_partners_policy/create"
      

Response [202]

Body

{"acknowledged":true}
      

POST /api/tasks/billing/instance_billing_plan_types_partners_policy/destroy

Request

Params


          {"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"charged_by"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"charged_by"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_types_partners_policy/destroy"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"invalid"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_ids":["9999","9999"],"plan_type_ids":["9999","9999"],"policy_name":"invalid"}' "https://partners.platformos.com/api/tasks/billing/instance_billing_plan_types_partners_policy/destroy"
      

Response [422]

Body

{"errors":["Invalid policy name"]}
      

POST /api/tasks/instance/change-billing-plan

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/change-billing-plan"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/change-billing-plan"
      

Response [422]

Body

{"errors":["Not authorized","Missing rights to Billing::InstanceBillingPlanType"]}
      

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/change-billing-plan"
      

Response [422]

Body

{"errors":["Not authorized","Missing rights to Instance"]}
      

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]"}' "https://partners.platformos.com/api/tasks/instance/change-billing-plan"
      

Response [422]

Body

{"errors":["Missing argument: instance_uuid. Passed arguments: instance_billing_plan_type_id, actor_id."]}
      

POST /api/tasks/instance/change-partner

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_id":"9999","partner_id":"[[partner_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_id":"9999","partner_id":"[[partner_id]]"}' "https://partners.platformos.com/api/tasks/instance/change-partner"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","partner_id":"[[partner_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","partner_id":"[[partner_id]]"}' "https://partners.platformos.com/api/tasks/instance/change-partner"
      

Response [422]

Body

{"errors":["Missing argument: instance_id. Passed arguments: instance_billing_plan_type_id, partner_id, actor_id."]}
      

POST /api/tasks/instance/create

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_params":{"endpoint_id":"[[endpoint_id]]","name":"[[name]]","tag_list":"yearly,supercool"},"partner_id":"[[partner_id]]","_":{"notifications":{"webhook_url":"http://your.webhook"}}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_params":{"endpoint_id":"[[endpoint_id]]","name":"[[name]]","tag_list":"yearly,supercool"},"partner_id":"[[partner_id]]","_":{"notifications":{"webhook_url":"http://your.webhook"}}}' "https://partners.platformos.com/api/tasks/instance/create"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_params":{"endpoint_id":"[[endpoint_id]]"},"partner_id":"[[partner_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_billing_plan_type_id":"[[instance_billing_plan_type_id]]","instance_params":{"endpoint_id":"[[endpoint_id]]"},"partner_id":"[[partner_id]]"}' "https://partners.platformos.com/api/tasks/instance/create"
      

Response [422]

Body

{"errors":["Name can't be blank"]}
      

POST /api/tasks/instance/integrations/manage_sendgrid

Request

Params


          {"instance_id":"9999","settings":{"email":"email@example.com","password":"password"}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_id":"9999","settings":{"email":"email@example.com","password":"password"}}' "https://partners.platformos.com/api/tasks/instance/integrations/manage_sendgrid"
      

Response [202]

Body

{"acknowledged":true}
      

Request

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]"  "https://partners.platformos.com/api/tasks/instance/integrations/manage_sendgrid"
      

Response [422]

Body

{"errors":["Missing argument: instance_id. Passed arguments: actor_id."]}
      

POST /api/tasks/instance/integrations/manage_twilio

Request

Params


          {"instance_id":"9999","settings":{"auth_token":"[[auth_token]]","from":"+15102330233023302330233023302330","sid":"sid-2330"}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_id":"9999","settings":{"auth_token":"[[auth_token]]","from":"+15102330233023302330233023302330","sid":"sid-2330"}}' "https://partners.platformos.com/api/tasks/instance/integrations/manage_twilio"
      

Response [202]

Body

{"acknowledged":true}
      

Request

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]"  "https://partners.platformos.com/api/tasks/instance/integrations/manage_twilio"
      

Response [422]

Body

{"errors":["Missing argument: instance_id. Passed arguments: actor_id."]}
      

POST /api/tasks/instance/schedule-disabling

Request

Params


          {"instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/schedule-disabling"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/schedule-disabling"
      

Response [422]

Body

{"errors":["Cannot disable DISABLED Instance. Only non-DISABLED Instances can be disabled."]}
      

POST /api/tasks/instance/set-domains

Request

Params


          {"domain_params":[{"name":"[[name]]","use_as_default":"true"},{"name":"[[name]]","redirect_code":"9999","redirect_to":"https://alpha.example.com"}],"instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"domain_params":[{"name":"[[name]]","use_as_default":"true"},{"name":"[[name]]","redirect_code":"9999","redirect_to":"https://alpha.example.com"}],"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/set-domains"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"domain_params":[{"name":"[[name]]"},{"name":"[[name]]"}],"instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"domain_params":[{"name":"[[name]]"},{"name":"[[name]]"}],"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/set-domains"
      

Response [422]

Body

{"errors":["Exactly one domain has to be default one. You have no default domains.","Name has to be unique, but \"alpha.example.com\" occurs 2 times."]}
      

POST /api/tasks/instance/update-configuration

Request

Params


          {"config":{"attributes":{"enable_sms_and_api_workflow_alerts_on_staging":"true","maintenance_mode":"false","test_email":"text-email@example.com"},"integrations":{"social":[{"provider":"facebook","consumer_key":"*************","consumer_secret":"*************"},{"provider":"github","consumer_key":"*************","consumer_secret":"*************"},{"provider":"google","consumer_key":"*************","consumer_secret":"*************"},{"provider":"instagram","consumer_key":"*************","consumer_secret":"*************"},{"provider":"linkedin","consumer_key":"*************","consumer_secret":"*************"},{"provider":"twitter","consumer_key":"*************","consumer_secret":"*************"}],"recaptcha":{"site_key":"site_key","secret_key":"*************"}}},"instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"config":{"attributes":{"enable_sms_and_api_workflow_alerts_on_staging":"true","maintenance_mode":"false","test_email":"text-email@example.com"},"integrations":{"social":[{"provider":"facebook","consumer_key":"*************","consumer_secret":"*************"},{"provider":"github","consumer_key":"*************","consumer_secret":"*************"},{"provider":"google","consumer_key":"*************","consumer_secret":"*************"},{"provider":"instagram","consumer_key":"*************","consumer_secret":"*************"},{"provider":"linkedin","consumer_key":"*************","consumer_secret":"*************"},{"provider":"twitter","consumer_key":"*************","consumer_secret":"*************"}],"recaptcha":{"site_key":"site_key","secret_key":"*************"}}},"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/update-configuration"
      

Response [202]

Body

{"acknowledged":true}
      

POST /api/tasks/partner/create

Request

Params


          {"partner_params":{"contact_email":"company-owner@email.com","support_email":"customer-support@email.com","name":"[[name]]"},"parent_id":"[[parent_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_params":{"contact_email":"company-owner@email.com","support_email":"customer-support@email.com","name":"[[name]]"},"parent_id":"[[parent_id]]"}' "https://partners.platformos.com/api/tasks/partner/create"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"partner_params":{"foo":"bar"},"parent_id":"[[parent_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_params":{"foo":"bar"},"parent_id":"[[parent_id]]"}' "https://partners.platformos.com/api/tasks/partner/create"
      

Response [422]

Body

{"errors":["Name can't be blank","Contact email can't be blank"]}
      

POST /api/tasks/partner/update

Request

Params


          {"partner_id":"[[partner_id]]","partner_params":{"contact_email":"company-owner@email.com","support_email":"customer-support@email.com","name":"[[name]]"},"parent_id":"[[parent_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_id":"[[partner_id]]","partner_params":{"contact_email":"company-owner@email.com","support_email":"customer-support@email.com","name":"[[name]]"},"parent_id":"[[parent_id]]"}' "https://partners.platformos.com/api/tasks/partner/update"
      

Response [202]

Body

{"acknowledged":true}
      

Request

Params


          {"partner_params":{"foo":"bar"},"parent_id":"[[parent_id]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"partner_params":{"foo":"bar"},"parent_id":"[[parent_id]]"}' "https://partners.platformos.com/api/tasks/partner/update"
      

Response [422]

Body

{"errors":["Missing argument: partner_id. Passed arguments: partner_params, parent_id, actor_id."]}
      

GET /api/endpoints

Request

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/endpoints"
      

Response [200]

Body

{"data":[{"id":9999,"name":"[[name]]"},{"id":9999,"name":"[[name]]"}]}
      

GET /api/instance_copies/[[ID]]

Request

Params


          {"id":"[[id]]"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/instance_copies/[[ID]]"
      

Response [200]

Body

{"data":{"id":9999,"status":"pending","error":null}}
      

POST /api/instance_copies

Request

Params


          {"source_instance_uuid":"[[UUID]]","target_instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"source_instance_uuid":"[[UUID]]","target_instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/instance_copies"
      

Response [200]

Body

{"id":9999,"status":"pending"}
      

GET /api/instances

Request

Params


          {"page":"9999","per_page":"9999"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/instances?page=1&per_page=2"
      

Response [200]

Body

{"data":[{"name":"[[name]]","uuid":"[[uuid]]"},{"name":"[[name]]","uuid":"[[uuid]]"}]}
      

GET /api/instances/search

Request

Params


          {"domain":"instance.lvh.me"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/instances/search?domain=instance.lvh.me"
      

Response [200]

Body

{"data":[{"endpoint":{"id":9999,"name":"[[name]]","url":"http://44.example.com"},"name":"[[name]]","partner":{"id":9999,"name":"[[name]]"},"uuid":"[[uuid]]","billing_plan":{"buyers":{"9999":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[],"overage_fees":[],"recurring_every":"month"}},"next_stage":{}},"usage_metrics":[]}]}
      

GET /api/instances/[[UUID]]

Request

Params


          {"uuid":"[[uuid]]"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/instances/[[UUID]]"
      

Response [200]

Body

{"data":{"endpoint":{"id":9999,"name":"[[name]]","url":"http://45.example.com"},"name":"[[name]]","partner":{"id":9999,"name":"[[name]]"},"uuid":"[[uuid]]","billing_plan":{"buyers":{"9999":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[],"overage_fees":[],"recurring_every":"month"}},"next_stage":{}},"usage_metrics":[{"overage_fee_type":"api_call_notifications_per_month","count":9999,"previous_month_count":0},{"overage_fee_type":"db_objects_count","count":9999,"previous_month_count":0,"count_current":900},{"overage_fee_type":"email_notifications_per_month","count":9999,"previous_month_count":0},{"overage_fee_type":"jobs_duration_per_month","count":0,"previous_month_count":0},{"overage_fee_type":"jobs_per_month","count":0,"previous_month_count":0},{"overage_fee_type":"production_domains_count","count":0},{"overage_fee_type":"requests_duration_per_month","count":9999,"previous_month_count":9999},{"overage_fee_type":"requests_per_month","count":9999,"previous_month_count":9999},{"overage_fee_type":"sms_notifications_per_month","count":9999,"previous_month_count":0},{"overage_fee_type":"storage_megabytes","count":0}]}}
      

GET /api/instances/[[UUID]]/configuration

Request

Params


          {"uuid":"[[uuid]]"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/instances/[[UUID]]/configuration"
      

Response [200]

Body

{"data":{"domains":[{"name":"[[name]]","created_at":"2018-08-09T12:43:52.037Z","redirect_to":null,"redirect_code":null,"use_as_default":true},{"name":"[[name]]","created_at":"2018-10-02T11:25:48.426Z","redirect_to":"your-domain.example.com","redirect_code":null,"use_as_default":false}],"attributes":{"test_email":"kacper@near-me.com","maintenance_mode":false,"enable_sms_and_api_workflow_alerts_on_staging":false},"integrations":{"social":{"github_consumer_key":"your_github_consumer_key","google_consumer_key":"your_google_consumer_key","twitter_consumer_key":"your_twitter_consumer_key","facebook_consumer_key":"your_facebook_consumer_key","linkedin_consumer_key":"your_linkedin_consumer_key","github_consumer_secret":"your_github_consumer_secret","google_consumer_secret":"your_google_consumer_secret","instagram_consumer_key":"your_instagram_consumer_key","twitter_consumer_secret":"your_twitter_consumer_secret","facebook_consumer_secret":"your_facebook_consumer_secret","linkedin_consumer_secret":"your_linkedin_consumer_secret","instagram_consumer_secret":"your_instagram_consumer_secret"},"twilio":{"sid":"your_sid","from":"your_from","auth_token":"[[auth_token]]"},"sendgrid":{"password":"your_password","user_name":"your_user_name"}}}}
      

GET /api/partners/[[ID]]/statements/seller

Request

Params


          {"partner_id":"[[partner_id]]"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/partners/[[ID]]/statements/seller"
      

Response [200]

Body

{"amount_cents":100,"results":[{"amount_cents":100,"current_amount_cents":100,"current_overages_amount_cents":0,"seller_id":9999,"seller_name":"Partner 219","monthly_subscriptions":[{"amount_cents":100,"current_amount_cents":100,"current_overages_amount_cents":0,"buyer_id":9999,"buyer_name":"Partner 222","monthly_subscriptions":[{"db_objects_count":0,"db_objects_count_current":0,"db_objects_count_previous_month":0,"production_domains_count":0,"domains":0,"jobs_current_month":0,"jobs_previous_month":0,"jobs_duration_current_month":0,"jobs_duration_previous_month":0,"current_requests_per_month":0,"requests_per_month":0,"current_requests_duration_per_month":0,"requests_duration_per_month":0,"api_call_notifications_current_month":0,"api_call_notifications_previous_month":0,"email_notifications_current_month":0,"email_notifications_previous_month":0,"sms_notifications_current_month":0,"sms_notifications_previous_month":0,"storage_megabytes":0,"instance_name":"Instance 37","instance_uuid":"[[UUID]]","instance_id":9999,"plan_started_at":"2000-01-01T00:00:00.000Z","plan_finished_at":null,"buyer_data":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 2","usage_fee_price_cents":60},{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 1","usage_fee_price_cents":40}],"overage_fees":[],"recurring_every":"month"},"seller_data":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 2","usage_fee_price_cents":60,"amount_cents":60.0},{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 1","usage_fee_price_cents":40,"amount_cents":40.0}],"overage_fees":[],"recurring_every":"month"},"seller_id":9999,"amount_cents":100,"current_amount_cents":100,"current_overages_amount_cents":0,"overages_amount_cents":0,"usage_percentage":0,"usage_percentage_avg":0},{"db_objects_count":0,"db_objects_count_current":0,"db_objects_count_previous_month":0,"production_domains_count":0,"domains":0,"jobs_current_month":0,"jobs_previous_month":0,"jobs_duration_current_month":0,"jobs_duration_previous_month":0,"current_requests_per_month":0,"requests_per_month":0,"current_requests_duration_per_month":0,"requests_duration_per_month":0,"api_call_notifications_current_month":0,"api_call_notifications_previous_month":0,"email_notifications_current_month":0,"email_notifications_previous_month":0,"sms_notifications_current_month":0,"sms_notifications_previous_month":0,"storage_megabytes":0,"instance_name":"Instance 38","instance_uuid":"[[UUID]]","instance_id":9999,"plan_started_at":"2000-01-01T00:00:00.000Z","plan_finished_at":null,"buyer_data":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 4","usage_fee_price_cents":800},{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 3","usage_fee_price_cents":400}],"overage_fees":[],"recurring_every":"year"},"seller_data":{"id":9999,"name":"[[name]]","buyer_id":9999,"parent_id":null,"seller_id":9999,"usage_fees":[{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 4","usage_fee_price_cents":800},{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 3","usage_fee_price_cents":400}],"overage_fees":[],"recurring_every":"year"},"seller_id":9999,"amount_cents":0,"current_amount_cents":0,"current_overages_amount_cents":0,"overages_amount_cents":0,"usage_percentage":0,"usage_percentage_avg":0}],"overages_amount_cents":0,"seller_id":9999,"seller_name":"Partner 219"}]}]}
      

GET /api/partners

Request

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/partners"
      

Response [200]

Body

{"data":[{"id":9999,"name":"[[name]]"},{"id":9999,"name":"[[name]]"}]}
      

GET /api/partners/[[ID]]

Request

Params


          {"id":"[[id]]"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" "https://partners.platformos.com/api/partners/[[ID]]"
      

Response [200]

Body

{"data":{"id":9999,"name":"[[name]]","available_instance_billing_plan_types":[{"id":9999,"description":"VIP Billing Plan 109, Usage Fee: $39.99 ($10.00 + $29.99)","environments":[{"id":9999,"name":"[[name]]","region":"Oregon"},{"id":9999,"name":"[[name]]","region":"Oregon"}],"instance_overage_fees":[{"id":9999,"max":10109,"name":"[[name]]","price_cents":7000,"overage_type":"db_objects_count","overage_unit":100}],"instance_usage_fees":[{"id":9999,"name":"[[name]]","price_cents":2999},{"id":9999,"name":"[[name]]","price_cents":1000}],"name":"[[name]]","recurring_every":"month","parent_id":null,"root_plan":true,"owner_name":"Partner 243","status":"published"}],"instance_billing_plan_types":[{"id":9999,"description":"VIP Billing Plan 109, Usage Fee: $39.99 ($10.00 + $29.99)","environments":[{"id":9999,"name":"[[name]]","region":"Oregon"},{"id":9999,"name":"[[name]]","region":"Oregon"}],"instance_overage_fees":[{"id":9999,"max":10109,"name":"[[name]]","price_cents":7000,"overage_type":"db_objects_count","overage_unit":100}],"instance_usage_fees":[{"id":9999,"name":"[[name]]","price_cents":2999},{"id":9999,"name":"[[name]]","price_cents":1000}],"name":"[[name]]","recurring_every":"month","parent_id":null,"root_plan":true,"owner_name":"Partner 243","status":"published"}]}}
      

Questions?

We are always happy to help with any questions you may have.

contact us