# Create and attach a service / product plan This endpoint attaches a product plan to an account. Endpoint: POST /api/v1/products/plans/campaigns Version: 2.0.0 Security: JWTAuth ## Request fields (application/json): - `account_id` (integer) Please enter an account id. Example: 12345 - `campaign_id` (integer) Please enter a campaign id. Example: 54321 - `service_plan_id` (integer) Please enter a service plan id. Example: 2100 ## Response 200 fields (application/json): - `data` (object, required) Example: {"account_id":12345,"campaign_id":54321,"service_plan_id":2100} - `data.account_id` (integer) Example: 12345 - `data.campaign_id` (integer) Example: 54321 - `data.service_plan_id` (integer) Example: 2100 - `error` (boolean, required) - `pagination` (object, required) Example: {"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":1} - `pagination.totalPages` (integer) Example: 1 - `pagination.maxRows` (integer) - `pagination.offset` (integer) - `pagination.page` (integer) Example: 1 - `pagination.totalRecords` (integer) Example: 1 - `messages` (array, required) Example: ["Successful plan attachment"] ## Response 400 fields (application/json): - `data` (object, required) Example: {} - `error` (boolean, required) Example: true - `pagination` (object, required) Example: {"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":0} - `pagination.totalPages` (integer) Example: 1 - `pagination.maxRows` (integer) - `pagination.offset` (integer) - `pagination.page` (integer) Example: 1 - `pagination.totalRecords` (integer) Example: 1 - `messages` (array, required) Example: ["Missing parameter"] ## Response 401 fields (application/json): - `data` (object, required) Example: {} - `error` (boolean, required) Example: true - `pagination` (object, required) Example: {"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":0} - `pagination.totalPages` (integer) Example: 1 - `pagination.maxRows` (integer) - `pagination.offset` (integer) - `pagination.page` (integer) Example: 1 - `pagination.totalRecords` (integer) Example: 1 - `messages` (array, required) Example: ["Invalid Authorization"] ## Response 405 fields (application/json): - `data` (object, required) Example: {} - `error` (boolean, required) Example: true - `pagination` (object, required) Example: {"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":0} - `pagination.totalPages` (integer) Example: 1 - `pagination.maxRows` (integer) - `pagination.offset` (integer) - `pagination.page` (integer) Example: 1 - `pagination.totalRecords` (integer) Example: 1 - `messages` (array, required) Example: ["Method Not Allowed"] ## Response 422 fields (application/json): - `data` (object, required) Example: {} - `error` (boolean, required) Example: true - `pagination` (object, required) Example: {"totalPages":1,"maxRows":0,"offset":0,"page":1,"totalRecords":0} - `pagination.totalPages` (integer) Example: 1 - `pagination.maxRows` (integer) - `pagination.offset` (integer) - `pagination.page` (integer) Example: 1 - `pagination.totalRecords` (integer) Example: 1 - `messages` (array, required) Example: ["Unprocessable Entity"]