Homepage

Partner Portal API

Last edit: Jun 24, 2022

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

POST /api/authenticate

Request

Params


          {"email":"[email protected]","password":"valid password"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]","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":"[email protected]","password":"INVALID PASSWORD"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]","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/deploy

Request

Params


          {"release_url":"https://example.com/release-1.zip","instance_uuid":"[[UUID]]"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"release_url":"https://example.com/release-1.zip","instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/deploy"
      

Response [202]

Body

{"acknowledged":true}
      

POST /api/tasks/instance/integrations/manage_sendgrid

Request

Params


          {"instance_id":"9999","settings":{"email":"[email protected]","password":"password"}}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"instance_id":"9999","settings":{"email":"[email protected]","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":"+15101151115111511151115111511151","sid":"sid-1151"}}
        

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":"+15101151115111511151115111511151","sid":"sid-1151"}}' "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."]}
      

Request

Params


          {"domain_params":[{"name":"[[name]]","use_as_default":"true"},{"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]]","use_as_default":"true"},{"name":"[[name]]"}],"instance_uuid":"[[UUID]]"}' "https://partners.platformos.com/api/tasks/instance/set-domains"
      

Response [422]

Body

{"errors":["Name has to be unique, but \"beta.example.com\" is in use by other instance.","Name has to be unique, but \"gamma.example.com\" is in use by other instance."]}
      

POST /api/tasks/instance/update-configuration

Request

Params


          {"config":{"attributes":{"enable_sms_and_api_workflow_alerts_on_staging":"true","maintenance_mode":"false","test_email":"[email protected]"},"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":"[email protected]"},"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":"[email protected]","support_email":"[email protected]","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":"[email protected]","support_email":"[email protected]","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":"[email protected]","support_email":"[email protected]","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":"[email protected]","support_email":"[email protected]","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","details":"true"}
        

cURL example


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

Response [200]

Body

{"data":[{"endpoint":{"id":9999,"name":"[[name]]","url":"http://58.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},{"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}]},{"endpoint":{"id":9999,"name":"[[name]]","url":"http://57.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},{"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}]},{"endpoint":{"id":9999,"name":"[[name]]","url":"http://56.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},{"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}]}]}
      

Request

Params


          {"domain":"instance.lvh.me","details":"true"}
        

cURL example


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

Response [200]

Body

{"data":[{"endpoint":{"id":9999,"name":"[[name]]","url":"http://62.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://63.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":800},{"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,"count_current":8},{"overage_fee_type":"production_domains_count","count":0,"count_current":2},{"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,"count_current":40}]}}
      

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":"[email protected]","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":104,"results":[{"amount_cents":104,"current_amount_cents":104,"current_overages_amount_cents":0,"seller_id":9999,"seller_name":"Partner 299","monthly_subscriptions":[{"amount_cents":104,"current_amount_cents":104,"current_overages_amount_cents":0,"buyer_id":9999,"buyer_name":"Partner 302","monthly_subscriptions":[{"db_objects_count":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 53","instance_uuid":"[[UUID]]","plan_id":9999,"plan_recurring_every":0,"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":62.4},{"usage_fee_id":9999,"usage_fee_name":"InstanceUsageFee 1","usage_fee_price_cents":40,"amount_cents":41.6}],"overage_fees":[],"recurring_every":"month"},"seller_id":9999,"amount_cents":104,"current_amount_cents":104,"current_overages_amount_cents":0,"overages_amount_cents":0,"usage_percentage":0,"usage_percentage_avg":0},{"db_objects_count":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 54","instance_uuid":"[[UUID]]","plan_id":9999,"plan_recurring_every":1,"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 299"}],"current_plan_upgrades_amount_cents":0}]}
      

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), Plan 2138","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 323","status":"published"}],"instance_billing_plan_types":[{"id":9999,"description":"VIP Billing Plan 109, Usage Fee: $39.99 ($10.00 + $29.99), Plan 2138","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 323","status":"published"}]}}
      

POST /api/pos_modules/[[ID]]/pos_module_versions

Request

Params


          {"pos_module_version":{"archive":"https://s3.url","name":"[[name]]"},"pos_module_id":"9999"}
        

cURL example


        curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [[auth_token]]" -d '{"pos_module_version":{"archive":"https://s3.url","name":"[[name]]"},"pos_module_id":"9999"}' "https://partners.platformos.com/api/pos_modules/[[ID]]/pos_module_versions"
      

Response [200]

Body

{"id":9999}
      

GET /api/pos_modules/[[ID]]/pos_module_versions/[[ID]]

Request

Params


          {"pos_module_id":"9999","id":"[[id]]"}
        

cURL example


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

Response [200]

Body

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

GET /api/pos_modules

Request

Params


          {"modules":"pos_module_8,pos_module_9"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" "https://partners.platformos.com/api/pos_modules?modules=pos_module_8%2Cpos_module_9"
      

Response [200]

Body

[{"module":"pos_module_8","versions":{"1.0.6":{"dependencies":{"core":"^1.0.0"}}}},{"module":"pos_module_9","versions":{"1.0.7":{"dependencies":{"core":"^1.5.0"}}}}]
      

GET /api/command_statuses/[[command_id]]

Request

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[token]]" "https://partners.platformos.com/api/command_statuses/cb3549ee-e04c-4f26-ad7c-c18967427d41"
      

Response [200]

Body

{"data":{"status":"success","command_output":{"release_url":"https://example.com/some_deployed_archive.zip","instance_url":"https://example.staging.oregon.platform-os.com","instance_uuid":"69c3ac6e-488d-4685-b9b9-18ca6b119825"},"message":null}}
      

GET /api/instance_name_checks/[[instance_name]]

Request

Params


          {"endpoint_id":"Endpoint id for which the instance availability check should be performed"}
        

cURL example


        curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [[token]]" "https://partners.platformos.com/api/instance_name_checks/some-name-to-check?endpoint_id=123"
      

Response [200]

Body

{"data":{"status":"available","message":"Instance name is available."}}
      

Questions?

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

contact us