-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.json
More file actions
1 lines (1 loc) · 326 KB
/
Copy pathswagger.json
File metadata and controls
1 lines (1 loc) · 326 KB
1
{"swagger":"2.0","info":{"title":"API PUBLIC","version":"public"},"paths":{"/api/activities":{"post":{"summary":"Create a single Activity","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"activity":{"type":"object","properties":{"user_name":{"type":"string","description":"Name of the Activity Owner"},"advertiser":{"type":"string","description":"Name of the Advertiser"},"agency":{"type":"string","description":"Name of the Agency"},"activity_type_name":{"type":"string","description":"Type Name of the Activity"},"happened_at":{"type":"string","description":"Date and time of Activity"},"deal_id":{"type":"string","x-nullable":true,"description":"ID of Deal"},"lead_id":{"type":"string","x-nullable":true,"description":"ID of Lead"},"publisher_id":{"type":"string","x-nullable":true,"description":"ID of Publisher"},"comment":{"type":"string","x-nullable":true,"description":"Note on the activity"},"contacts":{"type":"array","x-nullable":true,"items":{"type":"integer","description":"Contacts tied to the Activity"}},"custom_fields":{"type":"object","x-nullable":true}},"required":["user_name","account_id","activity_type_name","happened_at"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"activity\": {\n \"user_name\": \"Full Name\" (required),\n \"advertiser\": \"Name of Advertiser\" (required),\n \"agency\": \"Name of Agency\" (required),\n \"happened_at\": \"2019-01-01\" (required),\n \"activity_type_name\": \"Name of Activity Type\"(required),\n \"deal_id\": 1,\n \"lead_id\": 1,\n \"publisher_id\": 1,\n \"comment\": \"comment text\",\n \"contacts\": [1,2,3],\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"201":{"description":"create a single activity","schema":{"$ref":"#/definitions/activity_response"}},"422":{"description":"when contact not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get collection of Activities","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/activities?ids=1,2,3\n http://localhost/api/activities?page=5&per=2\n http://localhost/api/activities?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/activities?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/activities?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/activities?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get activities by ids","schema":{"type":"array","items":{"$ref":"#/definitions/activity_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/activities/{id}":{"delete":{"summary":"Delete a single Activity","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/activities/1\n\n","responses":{"204":{"description":"delete a single Activity"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Activity","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/activities/1\n\n","responses":{"200":{"description":"get a single activity","schema":{"$ref":"#/definitions/activity_response"}},"404":{"description":"when activity not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Activity","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"activity":{"type":"object","properties":{"user_name":{"type":"string","x-nullable":true,"description":"Name of the Activity Owner"},"advertiser":{"type":"string","x-nullable":true,"description":"Name of the Advertiser"},"agency":{"type":"string","x-nullable":true,"description":"Name of the Agency"},"activity_type_name":{"type":"string","x-nullable":true,"description":"Type Name of the Activity"},"deal_id":{"type":"string","x-nullable":true,"description":"ID of Deal"},"lead_id":{"type":"string","x-nullable":true,"description":"ID of Deal"},"publisher_id":{"type":"string","x-nullable":true,"description":"ID of Deal"},"happened_at":{"type":"string","description":"Date and time of Activity"},"comment":{"type":"string","x-nullable":true,"description":"Note on the activity"},"contacts":{"type":"array","x-nullable":true,"items":{"type":"integer","description":"Contacts tied to the Activity"}},"custom_fields":{"type":"object","x-nullable":true}}}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"activity\": {\n \"user_name\": \"Full Name\",\n \"advertiser\": \"Name of Advertiser\",\n \"agency\": \"Name of Agency\",\n \"activity_type_name\": \"Name of Activity Type\",\n \"deal_id\": 1,\n \"lead_id\": 1,\n \"publisher_id\": 1,\n \"happened_at\": \"2019-01-01\",\n \"comment\": \"comment text\",\n \"contacts\": [1,2,3],\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"200":{"description":"does not return an error","schema":{"$ref":"#/definitions/activity_response"}},"422":{"description":"when contact not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/activity_types":{"get":{"summary":"Get available types for Activities","tags":["Activities"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Example of Request\n\n http://localhost/api/activity_types\n http://localhost/api/activity_types?ids=1,2,3\n\n","responses":{"200":{"description":"get available types by ids","schema":{"type":"array","items":{"$ref":"#/definitions/simple_response"}}}}}},"/api/billing/credits":{"get":{"summary":"Get a paginated list of Billing Credits","tags":["Billing Credits"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 100)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"applied_date","in":"query","type":"string","description":"filter by applied_date"},{"name":"status","in":"query","type":"string","description":"filter by status(can be draft or applied)"},{"name":"month","in":"query","type":"string","description":"Month filter (MM)"},{"name":"year","in":"query","type":"string","description":"Year filter (YYYY)"}],"description":" Example of Request\n\n /api/billing/credits\n /api/billing/credits?id=1\n /api/billing/credits?ids=1,2,3\n /api/billing/credits?page=5&per=2\n /api/billing/credits?created_at=2019-01-01\n /api/billing/credits?updated_at=2019-02-02\n /api/billing/credits?month=08&year=2019\n /api/billing/credits?applied_date=2019-02-02\n /api/billing/credits?status=draft\n\n Gross fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"returns filtered by status","schema":{"type":"array","items":{"$ref":"#/definitions/billing_credit_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/accounts":{"post":{"summary":"Create a single Account","tags":["Account Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"account":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Account"},"type":{"type":"array","items":{"type":"string"},"description":"Array of types (Agency/Advertiser) of the Account"},"holding_company":{"type":"string","x-nullable":true,"description":"Holding company if type=Agency"},"category":{"type":"string","x-nullable":true,"description":"Category of the Account"},"parent_account":{"type":"string","x-nullable":true,"description":"Parent Account if applicable"},"parent_account_id":{"type":"integer","x-nullable":true,"description":"Parent Account ID"},"region":{"type":"string","x-nullable":true,"description":"Account region"},"segment":{"type":"string","x-nullable":true,"description":"Account segment"},"sub_category":{"type":"string","x-nullable":true,"description":"Sub Category of the Account"},"website":{"type":"string","x-nullable":true,"description":"Website of the Account"},"shell_record":{"type":"boolean","x-nullable":true},"note":{"type":"string","x-nullable":true},"locked":{"type":"boolean","x-nullable":true},"legacy_id":{"type":"string","x-nullable":true},"discount":{"type":"number","x-nullable":true},"team":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"user_id":{"type":"integer","x-nullable":true},"role":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"type":{"type":"string","x-nullable":true}}}},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"},"address":{"type":"object","properties":{"email":{"type":"string","x-nullable":true,"description":"Email address of the Contact"},"street1":{"type":"string","x-nullable":true,"description":"1st line of Contact’s street address"},"street2":{"type":"string","x-nullable":true,"description":"2nd line of Contact’s street address"},"city":{"type":"string","x-nullable":true,"description":"City the Contact lives in"},"state":{"type":"string","x-nullable":true,"description":"State the Contact lives in"},"zip":{"type":"string","x-nullable":true,"description":"US Zip code"},"country":{"type":"string","x-nullable":true,"description":"Country the Contact lives"},"phone":{"type":"string","x-nullable":true,"description":"Contact’s phone number"},"mobile":{"type":"string","x-nullable":true,"description":"Alternative phone number of the Contact"}}},"client_contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"contact_id":{"type":"integer","x-nullable":true},"is_active":{"type":"boolean","x-nullable":true},"primary":{"type":"boolean","x-nullable":true}}}},"client_connections":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"client_id":{"type":"integer","x-nullable":true},"active":{"type":"boolean","x-nullable":true},"primary":{"type":"boolean","x-nullable":true}}}}},"required":["name","type"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"account\":\n {\n \"name\": \"Test\" (required),\n \"website\": \"https:://google.com\",\n \"type\": [\"Agency\"] (required),\n \"category\": \"Other-things\",\n \"sub_category\": \"Mattresses\",\n \"parent_account\": \"Account Name\",\n \"parent_account_id\": 145,\n \"region\": \"Region\",\n \"segment\": \"Segmant\",\n \"holding_company\": \"Holding Company\",\n \"shell_record\": true,\n \"note\": \"Some notes\",\n \"locked\": true,\n \"legacy_id\": \"1\",\n \"discount\": 0.0,\n \"team\": [\n {\n \"user_id\": 1,\n \"role\": \"Account Manager\",\n \"share\": 100,\n \"type\": \"Agency\"\n }\n ],\n \"custom_fields\": {\"Credit Approval\": \"value\"},\n \"address\":{\n \"email\": \"my@email.com\",\n \"street1\": \"street1\",\n \"street2\": \"street2\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"12345\",\n \"country\": \"USA\",\n \"phone\": \"39240-2394\",\n \"mobile\": \"39240-2395\"\n },\n \"client_contacts\": [{\n \"contact_id\": 123,\n \"is_active\": true,\n \"primary\": true\n }],\n \"client_connections\":[\n {\n \"client_id\":123,\n \"active\":true,\n \"primary\":true\n }\n ]\n }\n }\n\n","responses":{"422":{"description":"is invalid","schema":{"$ref":"#/definitions/errors_object"}},"201":{"description":"Accepts case insensitive validation","schema":{"$ref":"#/definitions/account_response"}}}},"get":{"summary":"Get a paginated list of Accounts","tags":["Account Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"deleted_at","in":"query","type":"date","description":"Deleted Date of Item"},{"name":"deleted_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="}],"description":" Example of Request\n http://localhost/api/accounts?ids=1,2,3\n http://localhost/api/accounts?page=5&per=2\n http://localhost/api/accounts?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/accounts?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/accounts?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/accounts?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists","schema":{"type":"array","items":{"$ref":"#/definitions/accounts_response"}}},"422":{"description":"when deleted_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/accounts/{account_id}":{"delete":{"summary":"Delete a single Account","tags":["Account Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"account_id","in":"path","type":"integer","required":true}],"description":"\n Example of Request\n\n http://localhost/api/accounts/1\n\n","responses":{"200":{"description":"get item"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Account","tags":["Account Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"account_id","in":"path","type":"integer","required":true}],"description":"\n Example of Request\n\n http://localhost/api/accounts/1\n\n","responses":{"200":{"description":"returns account with related objects","schema":{"$ref":"#/definitions/account_response"}}}},"put":{"summary":"Update a single Account","tags":["Account Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"account_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"account":{"type":"object","properties":{"name":{"type":"string","x-nullable":true,"description":"Name of the Account"},"type":{"type":"string","x-nullable":true,"description":"Type (Agency/Advertiser) of the Account"},"holding_company":{"type":"string","x-nullable":true,"description":"Holding company if type=Agency"},"category":{"type":"string","x-nullable":true,"description":"Category of the Account"},"parent_account":{"type":"string","x-nullable":true,"description":"Parent Account if applicable"},"parent_account_id":{"type":"integer","x-nullable":true,"description":"Parent Account ID"},"region":{"type":"string","x-nullable":true,"description":"Account region"},"segment":{"type":"string","x-nullable":true,"description":"Account segment"},"sub_category":{"type":"string","x-nullable":true,"description":"Sub Category of the Account"},"website":{"type":"string","x-nullable":true,"description":"Website of the Account"},"shell_record":{"type":"boolean","x-nullable":true},"note":{"type":"string","x-nullable":true},"legacy_id":{"type":"string","x-nullable":true},"locked":{"type":"boolean","x-nullable":true},"discount":{"type":"number","x-nullable":true},"team":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"user_id":{"type":"integer","x-nullable":true},"role":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"type":{"type":"string","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true}}}},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"},"address":{"type":"object","properties":{"email":{"type":"string","x-nullable":true,"description":"Email address of the Contact"},"street1":{"type":"string","x-nullable":true,"description":"1st line of Contact’s street address"},"street2":{"type":"string","x-nullable":true,"description":"2nd line of Contact’s street address"},"city":{"type":"string","x-nullable":true,"description":"City the Contact lives in"},"state":{"type":"string","x-nullable":true,"description":"State the Contact lives in"},"zip":{"type":"string","x-nullable":true,"description":"US Zip code"},"country":{"type":"string","x-nullable":true,"description":"Country the Contact lives"},"phone":{"type":"string","x-nullable":true,"description":"Contact’s phone number"},"mobile":{"type":"string","x-nullable":true,"description":"Alternative phone number of the Contact"}}},"client_contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"contact_id":{"type":"integer","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true},"is_active":{"type":"boolean","x-nullable":true},"primary":{"type":"boolean","x-nullable":true}}}},"client_connections":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"client_id":{"type":"integer","x-nullable":true},"active":{"type":"boolean","x-nullable":true},"primary":{"type":"boolean","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true}}}},"required":["name","type"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"account\":\n {\n \"name\": \"Test\",\n \"website\": \"https:://google.com\",\n \"type\": \"Agency\",\n \"category\": \"Other-things\",\n \"sub_category\": \"Mattresses\",\n \"parent_account\": \"Account Name\",\n \"parent_account_id\": 145,\n \"region\": \"Region\",\n \"segment\": \"Segment\",\n \"holding_company\": \"Holding Company\",\n \"custom_fields\": {\"Credit Approval\": \"value\"},\n \"shell_record\": true,\n \"note\": \"Some notes\",\n \"locked\": true,\n \"legacy_id\": \"1\",\n \"discount\": 0.0,\n \"team\": [\n {\n \"user_id\": 2,\n \"role\": \"Account Manager\",\n \"share\": 100,\n \"type\": \"Agency\",\n \"_destroy\": true\n }\n ],\n \"address\":{\n \"email\": \"my@email.com\",\n \"street1\": \"street1\",\n \"street2\": \"street2\",\n \"city\": \"New York\",\n \"state\": \"NY\"\n \"zip\": \"12345\",\n \"country\": \"USA\",\n \"phone\": \"39240-2394\",\n \"mobile\": \"39240-2395\"\n },\n \"client_contacts\": [{\n \"contact_id\": 123,\n \"_destroy\": true,\n \"is_active\": true,\n \"primary\": true\n }],\n \"client_connections\":[\n {\n \"id\": 123,\n \"client_id\":123,\n \"active\":true,\n \"primary\":true\n },\n {\n \"id\": 124,\n \"client_id\":333,\n \"active\":true,\n \"primary\":false,\n \"_destroy\": true\n }\n ]\n }\n }\n","responses":{"422":{"description":"is invalid","schema":{"$ref":"#/definitions/errors_object"}},"202":{"description":"Handles multiselect values with whitespace trimming","schema":{"$ref":"#/definitions/account_response"}},"404":{"description":"when client not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/contacts":{"post":{"summary":"Create a single Contact","tags":["Contact Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"name":{"type":"string","description":"First and Last name of the Contact"},"first_name":{"type":"string","description":"First name of the Contact"},"last_name":{"type":"string","description":"Last name of the Contact"},"middle_name":{"type":"string","description":"Middle name of the Contact"},"title":{"type":"string","description":"Title of the Contact"},"position":{"type":"string","x-nullable":true,"description":"Job title of the Contact"},"works_at":{"type":"string","x-nullable":true,"description":"Client the Contact works at"},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"},"address":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the Contact"},"street1":{"type":"string","x-nullable":true,"description":"1st line of Contact’s street address"},"street2":{"type":"string","x-nullable":true,"description":"2nd line of Contact’s street address"},"city":{"type":"string","x-nullable":true,"description":"City the Contact lives in"},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true,"description":"State the Contact lives in"},"zip":{"type":"string","x-nullable":true,"description":"US Zip code"},"country":{"type":"string","x-nullable":true,"description":"Country the Contact lives"},"phone":{"type":"string","x-nullable":true,"description":"Contact’s phone number"},"mobile":{"type":"string","x-nullable":true,"description":"Alternative phone number of the Contact"}},"required":["email"]},"account_contacts":{"type":"array","items":{"description":"Account Contacts","x-nullable":true,"type":"object","properties":{"account_id":{"type":"integer","description":"ID of Account"},"is_active":{"type":"boolean","description":"true for Active; false for Inactive"}}}}},"required":["name","works_at","address"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"contact\":\n {\n \"name\": \"Test Name\" (required/can be blank if separate_contact_name_enabled),\n \"first_name\": \"Test Name\" (required if separate_contact_name_enabled),\n \"last_name\": \"Test Name\" (required if separate_contact_name_enabled),\n \"middle_name\": \"Test Name\", (if separate_contact_name_enabled)\n \"title\": \"Mr\", (if separate_contact_name_enabled)\n \"works_at\": \"test\",\n \"position\": \"position\",\n \"custom_fields\": {\n \"LinkedIn URL\": \"linkedin.com\"\n },\n \"address\":{\n \"email\": \"my@email.com\" (required),\n \"street1\": \"street1\",\n \"street2\": \"street2\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"12345\",\n \"country\": \"USA\",\n \"phone\": \"39240-2394\",\n \"mobile\": \"39240-2395\"\n },\n \"account_contacts\":[\n \"account_id\": 85407,\n \"is_active\": true\n ]\n }\n }\n","responses":{"422":{"description":"when account_id is blank","schema":{"$ref":"#/definitions/errors_object"}},"201":{"description":"rewrites name and saves contact","schema":{"$ref":"#/definitions/contact_response"}}}},"get":{"summary":"Get a paginated list of Contacts","tags":["Contact Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"deleted_at","in":"query","type":"date","description":"Deleted Date of Item"},{"name":"deleted_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"works_at","in":"query","type":"string","description":"Client the Contact works at"},{"name":"email","in":"query","type":"string","description":"Email of Contact"}],"description":" Example of Request\n http://localhost/api/contacts?ids=1,2,3\n http://localhost/api/contacts?page=5&per=2\n http://localhost/api/contacts?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/contacts?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/contacts?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/contacts?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n http://localhost/api/contacts?custom_fields['label1']=value1&custom_fields['label2']=value2]\n\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"returns contacts","schema":{"type":"array","items":{"$ref":"#/definitions/contact_response"}}},"422":{"description":"returns error message","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/contacts/{contact_id}":{"delete":{"summary":"Delete a single Contact","tags":["Contact Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"contact_id","in":"path","type":"integer","required":true}],"description":"\n Example of Request\n\n http://localhost/api/contacts/1\n\n","responses":{"204":{"description":"get item"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Contact","tags":["Contact Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"contact_id","in":"path","type":"integer","required":true}],"description":"\n Example of Request\n\n http://localhost/api/contacts/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/contact_response"}}}},"put":{"summary":"Update a single Contact","tags":["Contact Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"contact_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"name":{"type":"string","description":"First and Last name of the Contact"},"first_name":{"type":"string","description":"First name of the Contact"},"last_name":{"type":"string","description":"Last name of the Contact"},"middle_name":{"type":"string","description":"Middle name of the Contact"},"title":{"type":"string","description":"Title of the Contact"},"position":{"type":"string","x-nullable":true,"description":"Job title of the Contact"},"works_at":{"type":"string","x-nullable":true,"description":"Client the Contact works at"},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"}},"address":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the Contact"},"street1":{"type":"string","x-nullable":true,"description":"1st line of Contact’s street address"},"street2":{"type":"string","x-nullable":true,"description":"2nd line of Contact’s street address"},"city":{"type":"string","x-nullable":true,"description":"City the Contact lives in"},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true,"description":"State the Contact lives in"},"zip":{"type":"string","x-nullable":true,"description":"US Zip code"},"country":{"type":"string","x-nullable":true,"description":"Country the Contact lives"},"phone":{"type":"string","x-nullable":true,"description":"Contact’s phone number"},"mobile":{"type":"string","x-nullable":true,"description":"Alternative phone number of the Contact"}}},"account_contacts":{"type":"array","items":{"description":"Account Contacts","x-nullable":true,"type":"object","properties":{"id":{"type":"integer","description":"ID of AccountContact"},"account_id":{"type":"integer","description":"ID of Account"},"is_active":{"type":"boolean","description":"true for Active; false for Inactive"}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"contact\":\n {\n \"name\": \"Test Name\", (required/can be blank if separate_contact_name_enabled),\n \"first_name\": \"Test Name\", (required if separate_contact_name_enabled),\n \"last_name\": \"Test Name\", (required if separate_contact_name_enabled),\n \"middle_name\": \"Test Name\", (if separate_contact_name_enabled)\n \"title\": \"Mr\", (if separate_contact_name_enabled)\n \"works_at\": \"test\",\n \"position\": \"position\",\n \"custom_fields\": {\n \"LinkedIn URL\": \"linkedin.com\"\n },\n \"address\":{\n \"email\": \"my@email.com\",\n \"street1\": \"street1\",\n \"street2\": \"street2\",\n \"city\": \"New York\",\n \"state\": \"NY\"\n \"zip\": \"12345\",\n \"country\": \"USA\",\n \"phone\": \"39240-2394\",\n \"mobile\": \"39240-2395\"\n },\n \"account_contacts\": [\n {\n \"id\": 269757,\n \"is_active\": false\n }\n ]\n }\n }\n","responses":{"422":{"description":"when state is invalid","schema":{"$ref":"#/definitions/errors_object"}},"202":{"description":"rewrites name and saves contact","schema":{"$ref":"#/definitions/contact_response"}},"404":{"description":"when contact not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/ios/{io_id}/content_fees":{"post":{"summary":"Create a single Content Fee Line Item","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO the line item belongs to","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"content_fee":{"type":"object","properties":{"product_id":{"type":"integer","description":"ID of the Boostr Product for the line"},"budget":{"type":"number","description":"Total booked budget for the line in USD for the full flight ","x-nullable":true},"budget_loc":{"type":"number","description":"Total booked budget for the line in local currency for the full flight"},"content_fee_product_budgets_attributes":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"budget_loc":{"type":"number"},"budget":{"type":"number"}}}},"custom_fields":{"type":"object","x-nullable":true},"required":["budget_loc"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"content_fee\":\n {\n \"product_id\": 1(required),\n \"budget\": 1,\n \"budget_loc\": 400(required),\n \"custom_fields\": {\n \"CPM\": 10\n },\n \"content_fee_product_budgets_attributes\": {\n \"month\": \"2019-03\",\n \"budget\": 1,\n \"budget_loc\": 400\n }\n }\n }\n","responses":{"201":{"description":"when custom fields","schema":{"$ref":"#/definitions/content_fee_response"}},"422":{"description":"when monthly_budgets do not include all months","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Content Fee Line Items, grouped by IO","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"io_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n http://localhost/api/ios/1/content_fees?ids=1,2,3\n http://localhost/api/ios/1/content_fees?page=5&per=2\n http://localhost/api/ios/1/content_fees?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/ios/1/content_fees?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/ios/1/content_fees?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/ios/1/content_fees?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get by ids","schema":{"type":"array","items":{"$ref":"#/definitions/content_fee_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/ios/{io_id}/content_fees/{content_fee_id}":{"get":{"summary":"Get a single Content Fee Line Item","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true},{"name":"content_fee_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/ios/2/content_fees/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/content_fee_response"}}}},"put":{"summary":"Update a single Content Fee Line Item","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO the line item belongs to","required":true},{"name":"content_fee_id","in":"path","type":"integer","description":"Unique ID for the line item","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"content_fee":{"type":"object","properties":{"product_id":{"type":"integer","description":"ID of the Boostr Product for the line"},"budget":{"type":"number","description":"Total booked budget for the line in USD for the full flight ","x-nullable":true},"budget_loc":{"type":"number","description":"Total booked budget for the line in local currency for the full flight"},"content_fee_product_budgets_attributes":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"budget_loc":{"type":"number"},"budget":{"type":"number"}}}},"custom_fields":{"type":"object","x-nullable":true},"required":["budget_loc"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"content_fee\":\n {\n \"product_id\": 1,\n \"budget\": 1,\n \"budget_loc\": 400,\n \"custom_fields\": {\n \"CPM\": 10\n },\n \"content_fee_product_budgets_attributes\": {\n \"month\": \"2019-03\",\n \"budget\": 1,\n \"budget_loc\": 400\n }\n }\n }\n","responses":{"202":{"description":"when updating content fee product budget","schema":{"$ref":"#/definitions/content_fee_response"}},"422":{"description":"when monthly_budgets do not include all months","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/content_fees":{"get":{"summary":"Get a paginated list of Content Fee Line Items","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/content_fees?ids=1,2,3\n http://localhost/api/content_fees?page=5&per=2\n http://localhost/api/content_fees?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/content_fees?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/content_fees?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/content_fees?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"when between","schema":{"type":"array","items":{"$ref":"#/definitions/content_fee_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/content_fees/{content_fee_id}":{"get":{"summary":"Get a single Content Fee Line Item","tags":["Content Fees"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"content_fee_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/content_fees/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/content_fee_response"}}}}},"/api/contracts":{"post":{"summary":"Create a single Contract","tags":["Contract Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Contract"},"status":{"type":"string","description":"Status of the Contract"},"type":{"type":"string","description":"Type of the Contract"},"restricted":{"type":"boolean"},"auto_renew":{"type":"boolean"},"start_date":{"type":"string","format":"date","description":"Start date of the Contract"},"end_date":{"type":"string","format":"date","description":"End date of the Contract"},"signed_date":{"type":"string","format":"date","description":"Date of Signature"},"currency":{"type":"string","description":"ISC Currency Code"},"deal_id":{"type":"string","description":"Deal ID of Contract"},"contacts":{"type":"string","description":"Array of Contacts IDs on Contract"},"advertiser":{"type":"string","description":"Name of Advertiser"},"agency":{"type":"string","description":"Name of Agency"},"agency_holding":{"type":"string","description":"Name of Agency Holding"},"custom_fields":{"type":"object","x-nullable":true},"team":{"type":"array","items":{"description":"Team Members on Contract","x-nullable":true,"type":"object","properties":{"id":{"type":"integer","description":"ID of User"},"name":{"type":"string","x-nullable":true,"description":"Name of user"},"role":{"type":"string","x-nullable":true,"description":"Name of Role"}}}}},"required":["name","status","type","restricted"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"contract\":\n {\n \"name\": \"Test Name\" (required),\n \"status\": \"Active\" (required),\n \"type\": \"Type\" (required),\n \"restricted\": false (required),\n \"auto_renew\": true (required),\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2020-01-01\",\n \"signed_date\": \"2019-05-01\",\n \"currency\": \"USD\",\n \"deal_id\": 1,\n \"contacts\": [1,2,3],\n \"advertiser\": \"Name of Advertiser\",\n \"agency\": \"Name of Agency\",\n \"agency_holding\": \"Name of Agency Holding\",\n \"team\": [{\"id\": 1, \"role\": \"Name of role\"}],\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"201":{"description":"when deal_id is empty ","schema":{"$ref":"#/definitions/contract_response"}},"422":{"description":"when role of team member not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Contracts","tags":["Contract Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/contracts?ids=1,2,3\n http://localhost/api/contracts?page=5&per=2\n http://localhost/api/contracts?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/contracts?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/contracts?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/contracts?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get by ids","schema":{"type":"array","items":{"$ref":"#/definitions/contract_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/contracts/{id}":{"delete":{"summary":"Delete a single Contract","tags":["Contract Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/contracts/1\n\n","responses":{"204":{"description":"destroy the contract"},"404":{"description":"when contract not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Contract","tags":["Contract Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":"\n Example of Request\n\n http://localhost/api/contracts/1\n\n","responses":{"200":{"description":"get a single contract","schema":{"$ref":"#/definitions/contract_response"}}}},"put":{"summary":"Update a single Contract","tags":["Contract Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Contract"},"status":{"type":"string","description":"Status of the Contract"},"type":{"type":"string","description":"Type of the Contract"},"restricted":{"type":"boolean"},"auto_renew":{"type":"boolean"},"start_date":{"type":"string","format":"date","description":"Start date of the Contract"},"end_date":{"type":"string","format":"date","description":"End date of the Contract"},"signed_date":{"type":"string","format":"date","description":"Date of Signature"},"currency":{"type":"string","description":"ISC Currency Code"},"deal_id":{"type":"string","description":"Deal ID of Contract"},"contacts":{"type":"string","description":"Array of Contacts IDs on Contract"},"advertiser":{"type":"string","description":"Name of Advertiser"},"agency":{"type":"string","description":"Name of Agency"},"agency_holding":{"type":"string","description":"Name of Agency Holding"},"custom_fields":{"type":"object","x-nullable":true},"team":{"type":"array","items":{"description":"Team Members on Contract","x-nullable":true,"type":"object","properties":{"id":{"type":"integer","description":"ID of User"},"name":{"type":"string","x-nullable":true,"description":"Name of user"},"role":{"type":"string","x-nullable":true,"description":"Name of Role"}}}}}}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"contract\":\n {\n \"name\": \"Test Name\",\n \"status\": \"Active\",\n \"type\": \"Type\",\n \"restricted\": false,\n \"auto_renew\": true,\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2020-01-01\",\n \"signed_date\": \"2019-05-01\",\n \"currency\": \"USD\",\n \"deal_id\": 1,\n \"contacts\": [1,2,3],\n \"advertiser\": \"Name of Advertiser\",\n \"agency\": \"Name of Agency\",\n \"agency_holding\": \"Name of Agency Holding\",\n \"team\": [{\"id\": 1, \"role\": \"Name of role\"}],\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"200":{"description":"when deal_id is empty ","schema":{"$ref":"#/definitions/contract_response"}},"422":{"description":"when role of team member not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/deals/{deal_id}/deal_products":{"post":{"summary":"Create a single Deal Product","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"deal_product":{"type":"object","properties":{"product_name":{"type":"string","description":"Full name of Product"},"budget":{"type":"number","description":"Local currency budget","x-nullable":true},"budget_loc":{"type":"number","description":"Budget in USD"},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in array format: Key = custom field name,\n Value = custom field value"},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"budget":{"type":"number"},"budget_loc":{"type":"number"}}}}},"required":["budget_loc","product_name"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"deal_product\":\n {\n \"product_name\": \"Full name of Product\" (required),\n \"budget\": 1,\n \"budget_loc\": 400 (required),\n \"custom_fields\": {\n \"LinkedIn URL\": \"linkedin.com\"\n },\n \"monthly_budgets\": [{\n \"month\": \"2019-03\" (required),\n \"budget\": 1 (required),\n \"budget_loc\": 400 (required)\n }]\n }\n }\n","responses":{"422":{"description":"when monthly_budgets do not include all months","schema":{"$ref":"#/definitions/errors_object"}},"201":{"description":"Accepts case insensitive validation","schema":{"$ref":"#/definitions/deal_product_response"}}}},"get":{"summary":"Get a paginated list of Deal Products, grouped by Deal","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"deal_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n http://localhost/api/deals/{deal_id}/deal_products?ids=1,2,3\n http://localhost/api/deals/{deal_id}/deal_products?page=5&per=2\n http://localhost/api/deals/{deal_id}/deal_products?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/deals/{deal_id}/deal_products?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/deals/{deal_id}/deal_products?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/deals/{deal_id}/deal_products?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get by ids","schema":{"type":"array","items":{"$ref":"#/definitions/custom_deal_product_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/deals/{deal_id}/deal_products/{id}":{"delete":{"summary":"Delete a single Deal Product","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/deals/2/deal_products/1\n\n","responses":{"200":{"description":"get item"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Deal Product, grouped by Deal","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/deals/2/deal_products/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/deal_product_response"}}}},"put":{"summary":"Update a single Deal Product","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"deal_product":{"type":"object","properties":{"product_name":{"type":"integer","x-nullable":true,"description":"Full name of Product"},"budget":{"type":"number","description":"Local currency budget","x-nullable":true},"budget_loc":{"type":"number","description":"Budget in USD","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in array format: Key = custom field name,\n Value = custom field value"},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"properties":{"month":{"type":"string","description":"YYYY-MM"},"budget":{"type":"number","x-nullable":true},"budget_loc":{"type":"number"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"deal_product\":\n {\n \"product_name\": \"Full name of Product\" (required),\n \"budget\": 1,\n \"budget_loc\": 400 (required),\n \"custom_fields\": {\n \"LinkedIn URL\": \"linkedin.com\"\n },\n \"monthly_budgets\": [{\n \"month\": \"2019-03\",\n \"budget\": 1,\n \"budget_loc\": 400\n }]\n }\n }\n","responses":{"422":{"description":"when deal_product total budget does not equal to a sum of monthlies","schema":{"$ref":"#/definitions/errors_object"}},"202":{"description":"Accepts case insensitive validation","schema":{"$ref":"#/definitions/deal_product_response"}},"404":{"description":"when deal is closed","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/deal_products":{"get":{"summary":"Get a paginated list of Deal Products","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/deal_products?ids=1,2,3\n http://localhost/api/deal_products?page=5&per=2\n http://localhost/api/deal_products?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/deal_products?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/deal_products?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/deal_products?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists","schema":{"type":"array","items":{"$ref":"#/definitions/custom_deal_product_response"}}}}}},"/api/deal_products/{id}":{"get":{"summary":"Get a single Deal Product","tags":["Deal Products Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/deals/2/deal_products/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/deal_product_response"}}}}},"/api/deals":{"post":{"summary":"Create a single Deal","tags":["Deals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"deal":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Deal"},"type":{"type":"string","description":""},"source":{"type":"string","description":""},"next_steps":{"type":"string","description":""},"start_date":{"type":"string","format":"date","description":"Start date of the Deal"},"end_date":{"type":"string","format":"date","description":"End date of the Deal"},"stage_id":{"type":"integer","description":"ID of the Stage of the Deal"},"budget":{"type":"number","description":"USD budget"},"budget_loc":{"type":"number","description":"Local Currency budget"},"currency":{"type":"string","description":"ISO code for Deal currency"},"lead_id":{"type":"integer","description":"ID of Lead used to create Deal"},"advertiser_id":{"type":"integer","description":""},"agency_id":{"type":"integer","x-nullable":true,"description":""},"custom_fields":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"},"deal_members":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"user_id":{"type":"integer","x-nullable":true},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"role":{"type":"string","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true}}},"description":"If both user ID and email are present, system will choose User ID"},"deal_contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"middle_name":{"type":"string","x-nullable":true},"title":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"position":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true}}}},"integrations_attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":"integer","x-nullable":true},"external_type":{"type":"string","x-nullable":true}}}}}},"required":["name","advertiser_id","start_date","end_date","stage_id"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"deal\": {\n \"name\": \"Deal\" (required),\n \"type\": \"Type\",\n \"source\": \"Source\",\n \"next_steps\": \"Next Steps\",\n \"start_date\": \"2019-01-01\" (required),\n \"end_date\": \"2019-02-01\" (required),\n \"stage_id\": 1 (required),\n \"budget\": 1000,\n \"budget_loc\": 1000,\n \"currency\": \"USD\",\n \"lead_id\": 1,\n \"advertiser_id\": 2 (required),\n \"agency_id\": 3 (required if Validation is TRUE),\n \"custom_fields\": {\n \"custom\": \"custom_value\"\n },\n \"deal_members\": [{\"email\": \"member1@email.com\",\n \"share\": 100,\n \"seller_type\": \"Seller Type\",\n \"product_id\": 1,\n \"role\": \"Role\" }],\n \"deal_contacts\": [{\"id\": \"id of contact\",\n \"name\": \"name of contact\", (required/can be blank if separate_contact_name_enabled)\n \"first_name\": \"first name of contact\", (required if separate_contact_name_enabled)\n \"last_name\": \"last name of contact\", (required if separate_contact_name_enabled)\n \"middle_name\": \"middle name of contact\", (required if separate_contact_name_enabled)\n \"title\": \"title of contact\", (required if separate_contact_name_enabled)\n \"email\": \"email of contacts address\",\n \"position\": \"position\",\n \"role\": \"role\" }],\n \"integrations_attributes\": [\n {\n \"external_type\": \"operative\",\n \"external_id\": 3333\n }\n ]\n }\n }\n","responses":{"201":{"description":"creates a deal and links advertiser and agency","schema":{"$ref":"#/definitions/deal_response"}},"422":{"description":"by email","schema":{"$ref":"#/definitions/errors_object"}},"400":{"description":"Renders error without required params","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Deals","tags":["Deals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"deleted_at","in":"query","type":"date","description":"Deleted Date of Item"},{"name":"deleted_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"order_by","in":"query","type":"string","description":"ASC | DESC"},{"name":"sort_by","in":"query","type":"string","description":"Name of field to SORT_BY"},{"name":"closed_at","in":"query","type":"date","description":"Close Date of Item"},{"name":"closed_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: = "}],"description":" Example of Request\n http://localhost/api/deals?ids=1,2,3\n http://localhost/api/deals?page=5&per=2\n http://localhost/api/deals?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/deals?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/deals?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/deals?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"in desc order","schema":{"type":"array","items":{"$ref":"#/definitions/deal_response"}}},"422":{"description":"when deleted_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/deals/{deal_id}":{"delete":{"summary":"Delete single Deal","tags":["Deals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost:4200/api/deals/1\n\n","responses":{"200":{"description":"delete deal"},"422":{"description":"delete item"}}},"get":{"summary":"Get a single Deal","tags":["Deals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true}],"responses":{"200":{"description":"deal response","schema":{"$ref":"#/definitions/deal_response"}},"404":{"description":"error if not found"}}},"put":{"summary":"Update a single Deal","tags":["Deals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"deal":{"type":"object","properties":{"name":{"type":"string","x-nullable":true},"type":{"type":"string","x-nullable":true},"source":{"type":"string","x-nullable":true},"next_steps":{"type":"string","x-nullable":true},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"stage_id":{"type":"integer","x-nullable":true},"budget":{"type":"number","x-nullable":true},"budget_loc":{"type":"number","x-nullable":true},"currency":{"type":"string","x-nullable":true},"lead_id":{"type":"integer","x-nullable":true},"advertiser_id":{"type":"integer","x-nullable":true},"agency_id":{"type":"integer","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"closed_at":{"type":"string","format":"date","x-nullable":true},"closed_reason":{"type":"string","x-nullable":true},"closed_comments":{"type":"string","x-nullable":true},"deal_members":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"user_id":{"type":"integer","x-nullable":true},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"role":{"type":"string","x-nullable":true},"seller_type":{"type":"string"},"product_id":{"type":"integer"}}}},"deal_contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"position":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true}}}},"integrations_attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":"integer","x-nullable":true},"external_type":{"type":"string","x-nullable":true}}}}}},"required":["name","advertiser_id","start_date","end_date","stage_id"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"deal\": {\n \"name\": \"Deal\",\n \"type\": \"Type\",\n \"source\": \"Source\",\n \"next_steps\": \"Next Steps\",\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2019-02-01\",\n \"stage_id\": 1,\n \"budget\": 1000,\n \"budget_loc\": 1000,\n \"currency\": \"USD\",\n \"lead_id\": 1,\n \"advertiser_id\": 2 (required),\n \"agency_id\": 3 (required if Validation is TRUE),\n \"closed_at\": \"2020-01-01\",\n \"closed_reason\": \"Fire\",\n \"closed_comments\": \"My comment\"\n \"custom_fields\": {\n \"custom\": \"custom_value\"\n },\n \"integrations_attributes\": [\n {\n \"id\": 1,\n \"external_id\": 3423,\n \"external_type\": \"operative\"\n }\n ],\n \"deal_members\": [{\"id\": 1 (to update exist deal_member),\n \"email\": \"member1@email.com\" (to create a new one),\n \"share\": 100,\n \"seller_type: \"Seller Type,\n \"product_id: 1,\n \"role\": \"Role\" }],\n \"deal_contacts\": [{\"id\": \"id of contact\",\n \"name\": \"name of contact\",\n \"email\": \"email of contacts address\",\n \"position\": \"position\",\n \"role\": \"role\" }]\n }\n }\n","responses":{"200":{"description":"update a deal when closed_lost stage","schema":{"$ref":"#/definitions/deal_response"}},"422":{"description":"by email","schema":{"$ref":"#/definitions/errors_object"}},"400":{"description":"Renders error without required params","schema":{"$ref":"#/definitions/errors_object"}},"406":{"description":"Render error when deal on approval process"},"404":{"description":"Renders error if deal not found"}}}},"/api/deals_access/{deal_id}":{"get":{"summary":"Get a single Deal","tags":["Deal Access"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"deal_id","in":"path","type":"integer","required":true},{"name":"email","in":"query","type":"string","required":true,"description":"User email to check permissions"}],"responses":{"200":{"description":"deal response","schema":{"$ref":"#/definitions/deal_response"}},"404":{"description":"error if not found"},"403":{"description":"error if no permissions"}}}},"/api/ios/{io_id}/display_line_items":{"post":{"summary":"Create a single Display Line Item","tags":["Display Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"display_line_item":{"type":"object","properties":{"line_number":{"type":"integer","x-nullable":true,"description":"Numeric ID of the line in the external system"},"ad_server":{"type":"string","x-nullable":true,"description":"Name of the delivery system for the line"},"product_name":{"type":"string","description":"Name of the Boostr Product for the line"},"price":{"type":"number","x-nullable":true,"description":"Rate for the line in CPM"},"pricing_type":{"type":"string","x-nullable":true},"start_date":{"type":"string","description":"Start Date of the line"},"end_date":{"type":"string","x-nullable":true,"description":"End Date of the line"},"line_quantity":{"type":"integer","description":"Total units booked for the line for the full flight"},"line_quantity_delivered":{"type":"integer","x-nullable":true,"description":"Total units delivered for the line for the full flght"},"line_budget_loc":{"type":"integer","description":"Total booked budget for the line in local currency for the full flight"},"line_budget":{"type":"number","x-nullable":true,"description":"Total booked budget for the line in USD for the full flight"},"line_budget_delivered_loc":{"type":"number","x-nullable":true,"description":"Total budget delivered for the line in local currency for the full flight"},"line_budget_delivered":{"type":"number","x-nullable":true,"description":"Total budget delivered for the line in USD for the full flight "},"is_pg":{"type":"boolean","x-nullable":true},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"budget_delivered":{"type":"number","x-nullable":true},"budget_delivered_loc":{"type":"number"},"quantity_delivered":{"type":"integer","x-nullable":true}}}}},"required":["budget_loc","product_name"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"display_line_item\":\n {\n \"line_number\": \"value\",\n \"ad_server\": \"value\",\n \"product_name\": \"full name of product\" (required),\n \"price\": 1.2,\n \"pricing_type\": \"CPM\",\n \"start_date\": \"2019-01-01\" (required),\n \"end_date\": \"2019-02-01\" (required),\n \"line_quantity\": 10000 (required),\n \"line_quantity_delivered\": 100,\n \"line_budget_loc\": 100,\n \"line_budget\": 100,\n \"line_budget_delivered_loc\": 100 (required),\n \"line_budget_delivered\": 100,\n \"is_pg\": true,\n \"monthly_budgets\": [\n {\n \"month\": \"2019-01\",\n \"budget_delivered\": 1,\n \"budget_delivered_loc\": 1,\n \"quantity_delivered\": 1\n },\n {\n \"month\": \"2019-02\",\n \"budget_delivered\": 1,\n \"budget_delivered_loc\": 1,\n \"quantity_delivered\": 1\n }\n ] (must include all months)\n }\n }\n","responses":{"201":{"description":"when required params","schema":{"$ref":"#/definitions/display_line_item_response"}},"422":{"description":"is unexpected value","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Display Line Items including monthly numbers grouped by IO","tags":["Display Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"io_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n http://localhost/api/ios/1/display_line_items?ids=1,2,3\n http://localhost/api/ios/1/display_line_items?page=5&per=2\n http://localhost/api/ios/1/display_line_items?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/ios/1/display_line_items?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/ios/1/display_line_items?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/ios/1/display_line_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get by ids","schema":{"type":"array","items":{"$ref":"#/definitions/display_line_item_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/display_line_items":{"get":{"summary":"Get a paginated list of Display Line Items including monthly numbers","tags":["Display Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n\n http://localhost/apidisplay_line_items?page=5&per=2\n\n http://localhost/api/display_line_items?created_at=2019-01-01&created_at_condition=<\n\n http://localhost/api/display_line_items?updated_at=2019-02-02&updated_at_condition=>\n\n","responses":{"200":{"description":"io line items list","schema":{"type":"array","items":{"$ref":"#/definitions/display_line_item_response"}}}}}},"/api/ios/{io_id}/display_line_items/{display_line_item_id}":{"get":{"summary":"Get a single Display Line Item","tags":["Display Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true},{"name":"display_line_item_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/ios/2/display_line_items/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/display_line_item_response"}}}},"put":{"summary":"Update a single Display Line Item","tags":["Display Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true},{"name":"display_line_item_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"display_line_item":{"type":"object","properties":{"line_number":{"type":"integer","x-nullable":true,"description":"Numeric ID of the line in the external system"},"ad_server":{"type":"string","x-nullable":true,"description":"Name of the delivery system for the line"},"product_name":{"type":"string","x-nullable":true,"description":"Name of the Boostr Product for the line"},"price":{"type":"number","x-nullable":true,"description":"Rate for the line in CPM"},"start_date":{"type":"string","x-nullable":true,"description":"Start Date of the line"},"end_date":{"type":"string","x-nullable":true,"description":"End Date of the line"},"line_quantity":{"type":"integer","x-nullable":true,"description":"Total units booked for the line for the full flight"},"line_quantity_delivered":{"type":"integer","x-nullable":true,"description":"Total units delivered for the line for the full flght"},"line_budget_loc":{"type":"integer","x-nullable":true,"description":"Total booked budget for the line in local currency for the full flight"},"line_budget":{"type":"number","x-nullable":true,"description":"Total booked budget for the line in USD for the full flight"},"line_budget_delivered_loc":{"type":"number","x-nullable":true,"description":"Total budget delivered for the line in local currency for the full flight"},"line_budget_delivered":{"type":"number","x-nullable":true,"description":"Total budget delivered for the line in USD for the full flight "},"is_pg":{"type":"boolean","x-nullable":true,"description":""},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"budget_delivered":{"type":"number","x-nullable":true},"budget_delivered_loc":{"type":"number"},"quantity_delivered":{"type":"integer","x-nullable":true}}}}},"required":["budget_loc","product_name"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"display_line_item\":\n {\n \"line_number\": \"value\",\n \"ad_server\": \"value\",\n \"product_name\": \"full name of product\",\n \"price\": 1.2,\n \"start_date\": \"2017-01-01\",\n \"end_date\": \"2019-01-01\",\n \"line_quantity\": 10000,\n \"line_quantity_delivered\": 100,\n \"line_budget_loc\": 100,\n \"line_budget\": 100,\n \"line_budget_delivered_loc\": 100,\n \"line_budget_delivered\": 100,\n \"is_pg\": true,\n \"monthly_budgets\": [{\n \"month\": \"2019-03\",\n \"budget_delivered\": 1,\n \"budget_delivered_loc\": 1,\n \"quantity_delivered\": 1\n }]\n }\n }\n","responses":{"202":{"description":"when required params","schema":{"$ref":"#/definitions/display_line_item_response"}},"422":{"description":"is unexpected value","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/integrations":{"post":{"summary":"Create a new Integration","tags":["Integrations"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"integration":{"type":"object","properties":{"integratable_id":{"type":"integer","description":"integratable id"},"integratable_type":{"type":"string","description":"integratable type"},"external_id":{"type":"integer","description":"external id"},"external_type":{"type":"string","description":"external type"},"external_text_id":{"type":"string","description":"external text id"}}},"required":["integratable_id","integratable_type","external_id","external_type"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"integration\": {\n \"integratable_id\": 375042,\n \"integratable_type\": \"Deal\",\n \"external_id\": 1868294,\n \"external_type\": \"Broadsign\",\n \"external_text_id\": \"text\"\n }\n }\n","responses":{"201":{"description":"Creates a new Integration","schema":{"$ref":"#/definitions/integration_response"}},"400":{"description":"Renders error without required params","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Integrations","tags":["Integrations"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"integratable_id","in":"query","type":"integer","description":"integratable id"},{"name":"integratable_type","in":"query","type":"string","description":"integratable type"},{"name":"external_type","in":"query","type":"string","description":"external type"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 10)"}],"responses":{"200":{"description":"integrations list","schema":{"type":"array","items":{"$ref":"#/definitions/integration_response"}}}}}},"/api/integrations/{id}":{"put":{"summary":"Update a single Integration","tags":["Integrations"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","description":"Unique ID for the Integration","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"integration":{"type":"object","properties":{"integratable_id":{"type":"integer","description":"integratable id"},"integratable_type":{"type":"string","description":"integratable type"},"external_id":{"type":"integer","description":"external id"},"external_type":{"type":"string","description":"external type"},"external_text_id":{"type":"string","description":"external text id"}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"integration\":\n {\n \"integratable_id\": 375042,\n \"integratable_type\": \"Deal\",\n \"external_id\": 1868294,\n \"external_type\": \"Broadsign\",\n \"external_text_id\": \"text\"\n }\n }\n","responses":{"202":{"description":"when required params","schema":{"$ref":"#/definitions/integration_response"}},"422":{"description":"Renders error without required params","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/ios/{io_id}":{"delete":{"summary":"Delete single IO","tags":["IO Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost:4200/api/ios/1\n\n","responses":{"422":{"description":"delete item"}}},"get":{"summary":"Get a single IO","tags":["IO Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost:4200/api/ios/1\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/io_response"}}}},"put":{"summary":"Update a single IO","tags":["IO Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"Unique ID for the IO","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"io":{"type":"object","properties":{"name":{"type":"string"},"rate_card_id":{"type":"integer","x-nullable":true,"description":"ID of Rate Card"},"curr_cd":{"type":"string","x-nullable":true,"description":"ISO Code of Currency"},"start_date":{"type":"string","x-nullable":true,"description":"Start Date of IO"},"end_date":{"type":"string","x-nullable":true,"description":"End Date of IO"},"advertiser_id":{"type":"integer","x-nullable":true,"description":"ID of Advertiser"},"agency_id":{"type":"integer","x-nullable":true,"description":"ID of Agency"},"deal_id":{"type":"integer","x-nullable":true,"description":"ID of Deal"},"freezed":{"type":"boolean","x-nullable":true},"example":{"type":"string","x-nullable":true},"external_io_number":{"type":"integer","x-nullable":true},"billing_source":{"type":"string","x-nullable":true},"status":{"type":"string","x-nullable":true},"calendar_type":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"io_members":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"ID of User"},"email":{"type":"string","x-nullable":true,"description":"If both user ID and email are present, system will choose User ID"},"share":{"type":"integer","x-nullable":true},"from_date":{"type":"string","format":"date","x-nullable":true},"to_date":{"type":"string","format":"date","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true}}}},"discounts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"io\":\n {\n \"name\": \"IO name\",\n \"curr_cd\": \"USD\",\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2020-01-01\",\n \"advertiser_id\": \"1\",\n \"agency_id\": \"1\",\n \"deal_id\": \"1\",\n \"freezed\": \"true\",\n \"example\": \"example\",\n \"external_io_number\": \"123\",\n \"billing_source\": \"billing_source\",\n \"status\": \"Active\",\n \"calendar_type\": \"standard\",\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" },\n \"io_members\": [\n {\n \"id\": 2150,\n \"email\": \"i.abramenko@zazmic.com\",\n \"share\": 100,\n \"from_date\": \"2019-12-19\",\n \"to_date\": \"2020-03-31\",\n \"seller_type\": \"overlay\",\n \"product_id\": 1\n }\n ],\n \"discounts\": [\n {\n \"id\": 10,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n","responses":{"202":{"description":"calls worker that assign inherited values to child objects","schema":{"$ref":"#/definitions/io_response"}},"422":{"description":"by id","schema":{"$ref":"#/definitions/errors_object"}},"406":{"description":"Render error when deal on approval process"}}}},"/api/ios":{"get":{"summary":"Get a paginated list of IOs","tags":["IO Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"order_by","in":"query","type":"string","description":"ASC | DESC"},{"name":"sort_by","in":"query","type":"string","description":"Name of field to SORT_BY"},{"name":"io_number","in":"query","type":"integer","description":"number of Deal"},{"name":"include_revised","in":"query","type":"boolean","description":"if true, return the revised and not revised ios. Otherwise, just the not_revised ones"},{"name":"id","in":"query","type":"integer","description":"Io id"},{"name":"ids","in":"query","type":"array","description":"Io ids"}],"description":" Example of Request\n http://localhost/api/ios?ids=1,2,3\n http://localhost/api/ios?page=5&per=2\n http://localhost/api/ios?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/ios?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/ios?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/ios?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n http://localhost/api/ios?io_number=345\n\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get items with quantity booked","schema":{"type":"array","items":{"$ref":"#/definitions/io_response"}}},"422":{"description":"when invalid order_by and sort_by params","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/io_invoices":{"get":{"summary":"Get a paginated list of IO Invoices","tags":["IO Invoices"],"consumes":["application/json"],"produces":["application/json"],"description":" Example of Request\n\n /api/io_invoices?ids=1,2,3\n /api/io_invoices?page=5&per=2\n /api/io_invoices?year=2021&month=01\n /api/io_invoices?billing_status=open\n /api/io_invoices?io_ids=1,2,3\n /api/io_invoices?external_invoice_id=123\n /api/io_invoices?created_at_start=2021-01-01&created_at_end=2021-01-31\n /api/io_invoices?updated_at_start=2021-01-01&updated_at_end=2021-01-31\n /api/io_invoices?closed_at_start=2021-01-01&closed_at_end=2021-01-31\n\n Any Dates should be in the format of YYYY-MM-DD and multiple values should be comma separated\n Any Dates filter can work separately or together whether use start alone or end alone or both \n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n\n The 'rate_at_close' field currently uses the LOC value. This field will be updated to store the USD value,\n and a new field called 'rate_at_close_loc' will be added for the LOC value.\n","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"per","in":"query","type":"integer","description":"Number of items per page (default: 50, max: 100)"},{"name":"page","in":"query","type":"integer","description":"Page number"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"month","in":"query","type":"string","description":"Month filter (MM)"},{"name":"year","in":"query","type":"string","description":"Year filter (YYYY)"},{"name":"billing_status","in":"query","type":"string","description":"Billing status filter","enum":["open","closed"]},{"name":"io_id","in":"query","type":"string","description":"Filter by io"},{"name":"external_invoice_id","in":"query","type":"string","description":"External invoice ID"},{"name":"created_at_start","in":"query","type":"string","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end or :created_at >= start"},{"name":"created_at_end","in":"query","type":"string","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this) or :created_at <= end"},{"name":"updated_at_start","in":"query","type":"string","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end or :updated_at >= start"},{"name":"updated_at_end","in":"query","type":"string","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this) or :updated_at <= end"},{"name":"closed_at_start","in":"query","type":"string","description":"'YYYY-MM-DD' :closed_at BETWEEN start(this)..end or :closed_at >= start"},{"name":"closed_at_end","in":"query","type":"string","description":"'YYYY-MM-DD' :closed_at BETWEEN start..end(this) or :closed_at <= end"}],"responses":{"200":{"description":"when all filters are applied","schema":{"type":"array","items":{"$ref":"#/definitions/io_invoice_response"}}},"400":{"description":"when per is exceeding the limit"}}}},"/api/ios/{io_id}/line_items":{"post":{"summary":"Create a single Line Item","tags":["IO Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO the line item belongs to","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"line_item":{"type":"object","properties":{"line_name":{"type":"string","description":"Name of the line item"},"available_units":{"type":"string","x-nullable":true,"description":"Available Units of the line item"},"package_id":{"type":"number","x-nullable":true},"product_id":{"type":"number","description":"ID of Product"},"line_start_date":{"type":"string","description":"Start Date of the line"},"line_end_date":{"type":"string","description":"End Date of the line"},"line_actual_cost_loc":{"type":"number","description":"Final cost of the line in local currency"},"rate_booked_loc":{"type":"number","description":"Booked rate of the line in local currency"},"rate_booked":{"type":"number","description":"Booked rate of the line in USD"},"cost_adjustment":{"type":"number","x-nullable":true,"description":"Cost adjustment"},"is_added_value":{"type":"string","description":"Boolean to describe if line is added value"},"custom_fields":{"type":"object","x-nullable":true},"line_quantity_booked":{"type":"number","description":"Total units booked for the line for the full flight"},"line_quantity_delivered":{"type":"number","description":"Total units delivered for the line for the full flight"},"line_budget_booked_loc":{"type":"number","description":"Total booked budget for the line in local currency for the full flight"},"line_budget_booked":{"type":"number","description":"Total booked budget for the line in USD for the full flight"},"line_gross_budget_booked_loc":{"type":"number","description":"Total gross budget for the line in local currency for the full flight"},"line_gross_rate_loc":{"type":"number","x-nullable":true,"description":"Total gross rate for the line in local currency for the full flight"},"quantity_type":{"type":"string","x-nullable":true,"description":"Name of quantity type"},"billing_cap_override":{"type":"boolean"},"billing_source":{"type":"string","description":"Name of billing source type"},"territory":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"actual_cost_loc":{"type":"number"},"billable_budget":{"type":"number"},"billable_budget_loc":{"type":"number"},"billable_quantity":{"type":"number"},"budget_delivered":{"type":"number"},"budget_delivered_loc":{"type":"number"},"quantity_delivered":{"type":"number"},"forecast_budget":{"type":"number"},"forecast_budget_loc":{"type":"number"},"enable_billing_override":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom fields for the line item Monthly","x-nullable":true}}}},"inventory":{"type":"object","properties":{"item_id":{"type":"number"},"add_as":{"type":"string","x-nullable":true},"recalculation_by":{"type":"string","x-nullable":true},"periods":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"quantity":{"type":"number"}}}}}},"discounts":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"line_item\":\n {\n \"package_id\": 5,\n \"line_name\": \"Name of the line item\"(required),\n \"available_units\": 100,\n \"product_id\": 7(required),\n \"line_start_date\": \"2019-02-03\"(required),\n \"line_end_date\": \"2019-06-03\"(required),\n \"line_actual_cost_loc\": 1000,\n \"rate_booked_loc\": 1100(required. read-only if enhanced discount is enabled),\n \"rate_booked\": 1100(read-only if enhanced discount is enabled),\n \"cost_adjustment\": 10,\n \"is_added_value\": true(required),\n \"line_quantity_booked\": 1200(required),\n \"line_quantity_delivered\": 1200,\n \"line_budget_booked_loc\": 1300(required),\n \"line_budget_booked\": 1300,\n \"line_gross_budget_booked_loc\": 1300(required if enhanced discount is enabled),\n \"line_gross_rate_loc\": 900(available if enhanced discount is enabled),\n \"billing_source\": \"publisher\",\n \"quantity_type\": \"Impressions\",\n \"billing_cap_override\": true,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }(You can't update formula custom fields via the API.),\n \"monthly_budgets\": [\n {\n \"month\": \"2019-02\",\n \"actual_cost_loc\": 100,\n \"billable_budget\": 100,\n \"billable_budget_loc\": 100,\n \"billable_quantity\": 1,\n \"budget_delivered\": 100,\n \"budget_delivered_loc\": 100,\n \"quantity_delivered\": 1,\n \"forecast_budget\": 100,\n \"forecast_budget_loc\": 100,\n \"enable_billing_override\": true,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" } // You can't create formula custom field via the API\n }\n ],\n \"inventory\": {\n \"item_id\": 934,\n \"add_as\": \"sold\",\n \"recalculation_by\": \"budget\",\n \"periods\": [\n {\n \"id\": 94497,\n \"quantity\": 1,\n },\n {\n \"id\": 94498,\n \"quantity\": 2\n }\n ]\n }\n }\n },\n \"discounts\": [\n {\n \"id\": 10,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n\n Gross fields are available only if the enhanced discounts setting is enabled\n","responses":{"201":{"description":"when custom field name exists","schema":{"$ref":"#/definitions/io_line_item_response"}},"422":{"description":"when custom fields with datetime type are invalid","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Line Items including monthly numbers grouped by IO","tags":["IO Line Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"io_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"order_by","in":"query","type":"string","description":"ASC | DESC"},{"name":"sort_by","in":"query","type":"string","description":"Name of field to SORT_BY"}],"security":[{"Bearer":{}}],"description":" Example of Request\n http://localhost/api/ios/1/line_items?ids=1,2,3\n http://localhost/api/ios/1/line_items?page=5&per=2\n http://localhost/api/ios/1/line_items?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/ios/1/line_items?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/ios/1/line_items?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/ios/1/line_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"when billable amount override due to billable quantity update is disabled","schema":{"type":"array","items":{"$ref":"#/definitions/io_line_item_response"}}}}}},"/api/ios/{io_id}/line_items/{line_item_id}/itemized_costs":{"post":{"summary":"Create a single Itemized Cost","tags":["Itemized Costs"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO","required":true},{"name":"line_item_id","in":"path","type":"integer","description":"ID of the IO Line Item","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"itemized_cost":{"type":"object","properties":{"description":{"type":"string","x-nullable":true,"description":"Description of the itemized cost"},"cost_type":{"type":"string","x-nullable":true,"description":"Cost Type"},"monthlies":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"actual_cost_loc":{"type":"number"},"month":{"type":"string","description":"use format YYYY-MM"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n { \"itemized_cost\":\n {\n \"description\": \"Description of the itemized cost\",\n \"cost_type\": \"Cost Type\",\n \"monthlies\": [\n {\n \"actual_cost_loc\": 100.5,\n \"month\": \"2020-12\"\n }\n ]\n }\n }\n","responses":{"201":{"description":"create itemized cost","schema":{"$ref":"#/definitions/itemized_cost_response"}}}},"get":{"summary":"Get a collection of Itemized Costs","tags":["Itemized Costs"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO","required":true},{"name":"line_item_id","in":"path","type":"integer","description":"ID of the IO Line Item","required":true},{"name":"page","in":"query","type":"integer","description":"Number of the page"},{"name":"per","in":"query","type":"integer","description":"Number of items per page"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/ios/1/line_items/2/itemized_costs\n /api/ios/1/line_items/2/itemized_costs?ids=1,2,3\n","responses":{"200":{"description":"get itemized costs by ids","schema":{"type":"array","items":{"$ref":"#/definitions/itemized_cost_response"}}}}}},"/api/ios/{io_id}/line_items/{line_item_id}/itemized_costs/{id}":{"get":{"summary":"Get a single Itemized Cost","tags":["Itemized Costs"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO","required":true},{"name":"line_item_id","in":"path","type":"integer","description":"ID of the IO Line Item","required":true},{"name":"id","in":"path","type":"integer","description":"ID of the Itemized Cost","required":true}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/ios/1/line_items/2/itemized_costs/3\n","responses":{"200":{"description":"get itemized cost","schema":{"$ref":"#/definitions/itemized_cost_response"}}}},"put":{"summary":"Update a single Itemized Cost","tags":["Itemized Costs"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO","required":true},{"name":"line_item_id","in":"path","type":"integer","description":"ID of the IO Line Item","required":true},{"name":"id","in":"path","type":"integer","description":"ID of the Itemized Cost","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"itemized_cost":{"type":"object","properties":{"id":{"type":"number","x-nullable":true,"description":"ID of the itemized cost"},"description":{"type":"string","x-nullable":true,"description":"Description of the itemized cost"},"cost_type":{"type":"string","x-nullable":true,"description":"Cost Type"},"monthlies":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"actual_cost_loc":{"type":"number"},"month":{"type":"string","description":"use format YYYY-MM"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n { \"itemized_cost\":\n {\n \"id\": \"Itemized Cost ID\",\n \"description\": \"Description of the itemized cost\",\n \"cost_type\": \"Cost Type\",\n \"monthlies\": [\n {\n \"actual_cost_loc\": 100.5,\n \"month\": \"2020-12\"\n }\n ]\n }\n }\n","responses":{"200":{"description":"update itemized cost","schema":{"$ref":"#/definitions/itemized_cost_response"}}}}},"/api/ios/{io_id}/line_items/{id}":{"get":{"summary":"Get a single Line Item","tags":["IO Line Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"io_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n http://localhost/api/ios/1/line_items/2\n","responses":{"200":{"description":"when billable amount override due to billable quantity update is disabled","schema":{"$ref":"#/definitions/io_line_item_response"}}}},"put":{"summary":"Update a single Line Item","tags":["IO Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"io_id","in":"path","type":"integer","description":"ID of the IO the line item belongs to","required":true},{"name":"id","in":"path","type":"integer","description":"Unique ID for the line item","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"line_item":{"type":"object","properties":{"line_name":{"type":"string","x-nullable":true,"description":"Name of the line item"},"available_units":{"type":"string","x-nullable":true,"description":"Available Units of the line item"},"package_id":{"type":"number","x-nullable":true},"product_id":{"type":"number","x-nullable":true,"description":"ID of Product"},"line_start_date":{"type":"string","x-nullable":true,"description":"Start Date of the line"},"line_end_date":{"type":"string","x-nullable":true,"description":"End Date of the line"},"line_actual_cost_loc":{"type":"number","x-nullable":true,"description":"Final cost of the line in local currency"},"rate_booked_loc":{"type":"number","x-nullable":true,"description":"Booked rate of the line in local currency"},"rate_booked":{"type":"number","x-nullable":true,"description":"Booked rate of the line in USD"},"cost_adjustment":{"type":"number","x-nullable":true,"description":"Cost adjustment"},"rate_type_id":{"type":"number","x-nullable":true,"description":"ID of Rate type"},"is_added_value":{"type":"string","x-nullable":true,"description":"Boolean to describe if line is added value"},"line_quantity_booked":{"type":"number","x-nullable":true,"description":"Total units booked for the line for the full flight"},"line_quantity_delivered":{"type":"number","x-nullable":true,"description":"Total units delivered for the line for the full flight"},"line_budget_booked_loc":{"type":"number","x-nullable":true,"description":"Total booked budget for the line in local currency for the full flight"},"line_budget_booked":{"type":"number","x-nullable":true,"description":"Total booked budget for the line in USD for the full flight "},"line_gross_budget_booked_loc":{"type":"number","description":"Total gross budget for the line in local currency for the full flight"},"line_gross_rate_loc":{"type":"number","x-nullable":true,"description":"Total gross rate for the line in local currency for the full flight"},"custom_fields":{"type":"object","x-nullable":true},"quantity_type":{"type":"string","x-nullable":true,"description":"Name of quantity type"},"billing_cap_override":{"type":"boolean","x-nullable":true},"billing_source":{"type":"string","description":"Name of billing source type"},"territory":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"monthly_budgets":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"actual_cost_loc":{"type":"number"},"billable_budget":{"type":"number","desctiprion":"Total billable budget for the line in USD "},"billable_budget_loc":{"type":"number","description":"Total billable budget for the line in local currency"},"billable_quantity":{"type":"number","desctiprion":"Total units billable for the line for all months of the flight"},"budget_delivered":{"type":"number","description":"Total 1st party budget delivered for the line in USD"},"budget_delivered_loc":{"type":"number","description":"Total 1st party budget delivered for the line in local currency for all months of the flight "},"quantity_delivered":{"type":"number","description":"Total units delivered for the line for all months of the flight"},"forecast_budget":{"type":"number"},"forecast_budget_loc":{"type":"number"},"enable_billing_override":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom fields for the line item Monthly","x-nullable":true}}}},"inventory":{"type":"object","properties":{"item_id":{"type":"number"},"add_as":{"type":"string","x-nullable":true},"recalculation_by":{"type":"string","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true},"periods":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"quantity":{"type":"number"},"_destroy":{"type":"boolean","x-nullable":true}}}}}},"discounts":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"line_item\":\n {\n \"package_id\": 5,\n \"line_name\": \"Line Item Name\",\n \"available_units\": 200,\n \"product_id\": 7,\n \"line_start_date\": \"2019-02-03\",\n \"line_end_date\": \"2019-06-03\",\n \"line_actual_cost_loc\": 1000,\n \"rate_booked_loc\": 1100(read-only if enhanced discount is enabled),\n \"rate_booked\": 1100(read-only if enhanced discount is enabled),\n \"cost_adjustment\": 1000,\n \"is_added_value\": true,\n \"line_quantity_booked\": 1200,\n \"line_quantity_delivered\": 1200,\n \"line_budget_booked_loc\": 1300,\n \"line_budget_booked\": 1300,\n \"line_gross_budget_booked_loc\": 1300(available if enhanced discount is enabled),\n \"line_gross_rate_loc\": 900(available if enhanced discount is enabled),\n \"billing_source\": \"publisher\",\n \"enable_billing_override\": false,\n \"quantity_type\": \"Impressions\",\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }(You can't update formula custom fields via the API.),\n \"monthly_budgets\": [\n {\n \"month\": \"2019-02\",\n \"actual_cost_loc\": 100,\n \"billable_budget\": 100,\n \"billable_budget_loc\": 100,\n \"billable_quantity\": 1,\n \"budget_delivered\": 100,\n \"budget_delivered_loc\": 100,\n \"quantity_delivered\": 1,\n \"forecast_budget\": 100,\n \"forecast_budget_loc\": 100,\n \"enable_billing_override\": true,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" } // You can't update formula custom field via the API\n }\n ],\n \"inventory\": {\n \"item_id\": 934,\n \"_destroy\": true,\n \"add_as\": \"reserved\",\n \"recalculation_by\": \"budget\",\n \"periods\": [\n {\n \"id\": 94497,\n \"quantity\": 1,\n \"_destroy\": true\n },\n {\n \"id\": 94498,\n \"quantity\": 2\n }\n ]\n }\n },\n \"discounts\": [\n {\n \"id\": 10,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n\n Gross fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"when custom field was already created","schema":{"$ref":"#/definitions/io_line_item_response"}},"422":{"description":"when custom fields with datetime type are invalid","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/leads/":{"post":{"summary":"Create a single Lead","tags":["Leads"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"lead":{"type":"object","properties":{"email":{"type":"string","description":"Email address tied to Lead"},"first_name":{"type":"string","description":"Email address tied to Lead","x-nullable":true},"last_name":{"type":"string","description":"Last Name of Lead","x-nullable":true},"title":{"type":"string","description":"Title of Lead","x-nullable":true},"company_name":{"type":"string","description":"Name of Company from Lead","x-nullable":true},"country":{"type":"string","description":"Name of Country from Lead","x-nullable":true},"budget":{"type":"string","description":"Budget from Lead","x-nullable":true},"source_url":{"type":"string","description":"Source Url","x-nullable":true},"status":{"type":"string","description":"Status of Lead","x-nullable":true},"state":{"type":"string","description":"State of Lead","x-nullable":true},"product_name":{"type":"string","description":"Name of Product from Lead","x-nullable":true},"notes":{"type":"string","description":"Notes from Lead","x-nullable":true},"rejected_reason":{"type":"string","description":"Reason for Rejection","x-nullable":true},"rejected_reason_dropdown":{"type":"string","description":"Rejection Reason from dropdown options","x-nullable":true},"account_id":{"type":"string","description":"ID of Boostr Account tied to Lead","x-nullable":true},"contact_id":{"type":"string","description":"ID of Boostr Contact tied to Lead","x-nullable":true},"user_id":{"type":"string","description":"ID of Assigned Boostr User","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"source":{"type":"object","x-nullable":true,"properties":{"name":{"type":"string"},"info":{"type":"string","x-nullable":true},"url":{"type":"string","x-nullable":true}},"required":["name"]}},"required":["email"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\"lead\":\n {\n \"email\": \"email@gmail.com\" (required),\n \"first_name\": \"James\",\n \"last_name\": \"Bond\",\n \"title\": \"Title of Lead\",\n \"company_name\": \"My Company\",\n \"country\": \"USA\",\n \"budget\": \"10000\",\n \"source_url\": \"https://boostr.com/\",\n \"status\": \"accepted\",\n \"state\": \"Texas\",\n \"product_name\": \"MyProduct\",\n \"notes\": \"Some notes\",\n \"rejected_reason\": \"Some reason\",\n \"rejected_reason_dropdown\": \"Not Interested\",\n \"account_id\": 1,\n \"contact_id\": 2,\n \"user_id\": 3,\n \"source\": {\"name\": \"Name of Source\", \"info\": \"Info of Source\", \"url\": \"https://boostr.com\"},\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"201":{"description":"is rejected","schema":{"$ref":"#/definitions/lead_response"}},"422":{"description":"when status not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/leads/{id}":{"delete":{"summary":"Delete a single Lead","tags":["Leads"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/leads/3\n\n","responses":{"204":{"description":"delete a single lead"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Lead","tags":["Leads"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/leads/1\n\n","responses":{"200":{"description":"get lead","schema":{"$ref":"#/definitions/lead_response"}},"404":{"description":"when lead not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Lead","tags":["Leads"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"lead":{"type":"object","properties":{"email":{"type":"string","description":"Email address tied to Lead","x-nullable":true},"first_name":{"type":"string","description":"Email address tied to Lead","x-nullable":true},"last_name":{"type":"string","description":"Last Name of Lead","x-nullable":true},"title":{"type":"string","description":"Title of Lead","x-nullable":true},"company_name":{"type":"string","description":"Name of Company from Lead","x-nullable":true},"country":{"type":"string","description":"Name of Country from Lead","x-nullable":true},"budget":{"type":"string","description":"Budget from Lead","x-nullable":true},"source_url":{"type":"string","description":"Source Url","x-nullable":true},"status":{"type":"string","description":"Status of Lead","x-nullable":true},"state":{"type":"string","description":"State of Lead","x-nullable":true},"product_name":{"type":"string","description":"Name of Product from Lead","x-nullable":true},"notes":{"type":"string","description":"Notes from Lead","x-nullable":true},"rejected_reason":{"type":"string","description":"Reason for Rejection","x-nullable":true},"rejected_reason_dropdown":{"type":"string","description":"Rejection Reason from dropdown options","x-nullable":true},"account_id":{"type":"string","description":"ID of Boostr Account tied to Lead","x-nullable":true},"contact_id":{"type":"string","description":"ID of Boostr Contact tied to Lead","x-nullable":true},"user_id":{"type":"string","description":"ID of Assigned Boostr User","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"source":{"type":"object","x-nullable":true,"properties":{"name":{"type":"string"},"info":{"type":"string","x-nullable":true},"url":{"type":"string","x-nullable":true}},"required":["name"]}},"required":["email"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\"lead\":\n {\n \"email\": \"email@gmail.com\",\n \"first_name\": \"James\",\n \"last_name\": \"Bond\",\n \"title\": \"Title of Lead\",\n \"company_name\": \"My Company\",\n \"country\": \"USA\",\n \"budget\": \"10000\",\n \"source_url\": \"https://boostr.com/\",\n \"status\": \"accepted\",\n \"state\": \"state\",\n \"product_name\": \"MyProduct\",\n \"notes\": \"Some notes\",\n \"rejected_reason\": \"Some reason\",\n \"rejected_reason_dropdown\": \"Not Interested\",\n \"account_id\": 1,\n \"contact_id\": 2,\n \"user_id\": 3,\n \"source\": {\"name\": \"Name of Source\", \"info\": \"Info of Source\", \"url\": \"https://boostr.com\"},\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"200":{"description":"when params[:account_id] has null value","schema":{"$ref":"#/definitions/lead_response"}},"422":{"description":"when status not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/leads":{"get":{"summary":"Get collection of Leads","tags":["Leads"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 50)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/leads?ids=1,2,3\n http://localhost/api/leads?page=5&per=2\n http://localhost/api/leads?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/leads?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/leads?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/leads?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists by ids","schema":{"type":"array","items":{"$ref":"#/definitions/lead_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/line_items":{"get":{"summary":"Get a paginated list of Line Items including monthly numbers","tags":["IO Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"order_by","in":"query","type":"string","description":"ASC | DESC"},{"name":"sort_by","in":"query","type":"string","description":"Name of field to SORT_BY"}],"description":" Example of Request\n http://localhost/api/line_items?ids=1,2,3\n http://localhost/api/line_items?page=5&per=2\n http://localhost/api/line_items?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/line_items?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/line_items?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/line_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get items order by id desc","schema":{"type":"array","items":{"$ref":"#/definitions/io_line_item_response"}}},"422":{"description":"when invalid order_by and sort_by params"}}}},"/api/media_plans":{"post":{"summary":"Create a Media Plan","tags":["Media Plans"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"media_plan":{"type":"object","properties":{"deal_id":{"type":"integer"},"owner_id":{"type":"integer"},"name":{"type":"string"},"budget_goal":{"type":"number","x-nullable":true},"budget_goal_loc":{"type":"number","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"margin":{"type":"integer","x-nullable":true},"status":{"type":"string","x-nullable":true},"is_primary":{"type":"boolean","x-nullable":true},"is_current":{"type":"boolean","x-nullable":true},"is_locked":{"type":"boolean","x-nullable":true},"rate_card_id":{"type":"integer"},"cost":{"type":"string","x-nullable":true},"cost_loc":{"type":"string","x-nullable":true},"created_by":{"type":"integer","x-nullable":true},"updated_by":{"type":"integer","x-nullable":true},"discounts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}},"required":["deal_id","owner_id","name","rate_card_id"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"media_plan\":\n {\n \"deal_id\": 1,\n \"owner_id\": 2,\n \"name\": \"New media plan\",\n \"budget_goal\": 5,\n \"budget_goal_loc\": 2000,\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2019-12-31\",\n \"margin\": 100,\n \"status\": \"status\",\n \"is_primary\": true,\n \"is_current\": false,\n \"is_locked\": true,\n \"rate_card_id\": 3,\n \"cost\": 1,\n \"cost_loc\": 400,\n \"created_by\": 76,\n \"updated_by\": 76,\n \"discounts\": [\n {\n \"id\": 1,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n","responses":{"201":{"description":"creates media plan and ignore discounts params","schema":{"$ref":"#/definitions/media_plans_response"}},"422":{"description":"when status not in list","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Media Plans","tags":["Media Plans"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"filter media plans by created date value (to setup condition use created_at_condition param)"},{"name":"created_at_condition","in":"query","type":"string","description":"filter media plans by created date condition <, >, <=, >=, = (for define value use :created_at)"},{"name":"updated_at","in":"query","type":"date","description":"filter media plans by updated date value (to setup condition use updated_at_condition param)"},{"name":"updated_at_condition","in":"query","type":"string","description":"filter media plans by updated date condition <, >, <=, >=, = (for define value use :updated_at)"},{"name":"created_at_start","in":"query","type":"date","description":"filter media plans by range created_at_start..created_at_end"},{"name":"created_at_end","in":"query","type":"date","description":"filter media plans by range created_at_start..created_at_end"},{"name":"updated_at_start","in":"query","type":"date","description":"filter media plans by range updated_at_start..updated_at_end"},{"name":"updated_at_end","in":"query","type":"date","description":"filter media plans by range updated_at_start..updated_at_end"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Example of Request\n http://localhost/api/media_plans?ids=1,2,3\n http://localhost/api/media_plans?page=5&per=2\n http://localhost/api/media_plans?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/media_plans?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/media_plans?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/media_plans?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"when between","schema":{"type":"array","items":{"$ref":"#/definitions/media_plans_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/media_plans/{media_plan_id}/line_items":{"post":{"summary":"Create a single Media Plan Line Item","tags":["Media Plan Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"media_plan_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"line_item":{"type":"object","properties":{"name":{"type":"string","description":"Name of the line item"},"available_units":{"type":"string","x-nullable":true,"description":"Available Units of the line item"},"start_date":{"type":"string","format":"date","description":"Start Date of the line item"},"end_date":{"type":"string","format":"date","description":"End Date of the line item"},"media_plan_package_id":{"type":"integer","x-nullable":true,"description":"Name of the package the media plan line item belongs to (if any)"},"product_id":{"type":"integer","description":"ID of the Product for the line item"},"budget":{"type":"number","x-nullable":true,"description":"Budget of the line item in USD"},"budget_loc":{"type":"number","x-nullable":true,"description":"Budget of the line item in local currency"},"rate":{"type":"number","x-nullable":true,"description":"Rate of the line item in USD"},"rate_loc":{"type":"number","x-nullable":true,"description":"Rate of the line item in local currency"},"quantity":{"type":"integer","x-nullable":true,"description":"Quantity expected for the line item"},"gross_budget_loc":{"type":"number","x-nullable":true,"description":"Gross Budget of the line item in local currency"},"gross_rate_loc":{"type":"number","x-nullable":true,"description":"Gross Rate of the line item in local currency"},"rate_type_name":{"type":"string","x-nullable":true,"description":"Name of the rate type of the line item"},"is_added_value":{"type":"boolean","x-nullable":true,"description":"Boolean for added value status for this line item for this media plan"},"est_cost":{"type":"number","x-nullable":true,"description":"Estimated cost of the line item"},"est_cost_loc":{"type":"number","x-nullable":true,"description":"Estimated cost of the line item in local currency"},"custom_fields":{"type":"object","x-nullable":true},"quantity_type":{"type":"string","x-nullable":true,"description":"Name of quantity type"},"line_budget_delivered_loc":{"type":"number","x-nullable":true},"margin":{"type":"number","x-nullable":true,"description":"Margin % of the line item in integer"},"cost_adjustment":{"type":"number","x-nullable":true,"description":"Cost adjustment"},"inventory":{"type":"object","properties":{"item_id":{"type":"number"},"add_as":{"type":"string","x-nullable":true},"recalculation_by":{"type":"string","x-nullable":true},"periods":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"quantity":{"type":"number"}}}}}},"discounts":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}},"required":["name"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"line_item\":\n {\n \"name\": \"test\", (required)\n \"start_date\": \"2018-11-20\", (required)\n \"end_date\": \"2018-11-22\", (required)\n \"product_id\": 1760, (required)\n \"available_units\": 100,\n \"media_plan_package_id\": 76,\n \"budget\": 11 (read-only if enhanced discount is enabled),\n \"budget_loc\": 2 (read-only if enhanced discount is enabled),\n \"rate\": 3, (read-only if enhanced discount is enabled),\n \"rate_loc\": 4, (read-only if enhanced discount is enabled),\n \"quantity\": 1,\n \"gross_budget_loc\": 5 (available if enhanced discount is enabled),\n \"gross_rate_loc\": 2 (available if enhanced discount is enabled),\n \"rate_type_name\": \"CPC\",\n \"is_added_value\": 1,\n \"est_cost\": 123,\n \"est_cost_loc\": 777,\n \"margin\": 3,\n \"cost_adjustment\": 10,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }(You can't update formula custom fields via the API.),\n \"quantity_type\": \"Impressions\",\n \"inventory\": {\n \"item_id\": 934,\n \"add_as\": \"reserved\",\n \"recalculation_by\": \"budget\",\n \"periods\": [\n {\n \"id\": 94497,\n \"quantity\": 1,\n },\n {\n \"id\": 94498,\n \"quantity\": 2\n }\n ]\n },\n \"discounts\": [\n {\n \"id\": 10,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n","responses":{"201":{"description":"creates media plan line item","schema":{"$ref":"#/definitions/media_plan_line_item_response"}},"422":{"description":"when inventory item has not an available period","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get collection of Line Item of Media Plan","tags":["Media Plan Line Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"media_plan_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"security":[{"Bearer":{}}],"description":" Example of Request\n http://localhost/api/media_plans/1/line_items?ids=1,2,3\n http://localhost/api/media_plans/1/line_items?page=5&per=2\n http://localhost/api/media_plans/1/line_items?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/media_plans/1/line_items?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/media_plans/1/line_items?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/media_plans/1/line_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists by ids","schema":{"type":"array","items":{"$ref":"#/definitions/media_plan_line_item_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/media_plans/{media_plan_id}/line_items/{line_item_id}":{"get":{"summary":"Get a single Line Item of Media Plan","tags":["Media Plan Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"media_plan_id","in":"path","type":"integer","required":true},{"name":"line_item_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/media_plans/1/line_items/2\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/media_plan_line_item_response"}}}},"put":{"summary":"Update a single Media Plan Line Item","tags":["Media Plan Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"media_plan_id","in":"path","type":"integer","required":true},{"name":"line_item_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"line_item":{"type":"object","properties":{"name":{"type":"string","x-nullable":true,"description":"Name of the line item"},"available_units":{"type":"string","x-nullable":true,"description":"Available Units of the line item"},"start_date":{"type":"string","format":"date","x-nullable":true,"description":"Start Date of the line item"},"end_date":{"type":"string","format":"date","x-nullable":true,"description":"End Date of the line item"},"media_plan_package_id":{"type":"integer","x-nullable":true,"description":"Name of the package the media plan line item belongs to (if any)"},"product_id":{"type":"integer","x-nullable":true,"description":"ID of the Product for the line item"},"quantity_type":{"type":"string","x-nullable":true,"description":"Name of quantity type"},"budget":{"type":"number","x-nullable":true,"description":"Budget of the line item in USD"},"budget_loc":{"type":"number","x-nullable":true,"description":"Budget of the line item in local currency"},"rate":{"type":"number","x-nullable":true,"description":"Rate of the line item in USD"},"rate_loc":{"type":"number","x-nullable":true,"description":"Rate of the line item in local currency"},"rate_type_id":{"type":"integer","x-nullable":true,"description":"ID of the rate type"},"quantity":{"type":"integer","x-nullable":true,"description":"Quantity expected for the line item"},"gross_budget_loc":{"type":"number","x-nullable":true,"description":"Gross Budget of the line item in local currency"},"gross_rate_loc":{"type":"number","x-nullable":true,"description":"Gross Rate of the line item in local currency"},"rate_type_name":{"type":"string","x-nullable":true,"description":"Name of the rate type of the line item"},"is_added_value":{"type":"boolean","x-nullable":true,"description":"Boolean for added value status for this line item for this media plan"},"est_cost":{"type":"number","x-nullable":true,"description":"Estimated cost of the line item"},"est_cost_loc":{"type":"number","x-nullable":true,"description":"Estimated cost of the line item in local currency"},"custom_fields":{"type":"object","x-nullable":true},"line_budget_delivered_loc":{"type":"number","x-nullable":true},"margin":{"type":"number","x-nullable":true,"description":"Margin % of the line item in integer"},"cost_adjustment":{"type":"number","x-nullable":true,"description":"Cost adjustment"},"inventory":{"type":"object","properties":{"item_id":{"type":"number"},"add_as":{"type":"string","x-nullable":true},"recalculation_by":{"type":"string","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true},"periods":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"quantity":{"type":"number"},"_destroy":{"type":"boolean","x-nullable":true}}}}}},"discounts":{"type":"array","items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"line_item\":\n {\n \"name\": \"test\",\n \"available_units\": 100,\n \"start_date\": \"2018-11-20\",\n \"end_date\": \"2018-11-22\",\n \"media_plan_package_id\": 76,\n \"product_id\": 1760,\n \"budget\": 11 (read-only if enhanced discount is enabled),\n \"budget_loc\": 2 (read-only if enhanced discount is enabled),\n \"rate\": 3, (read-only if enhanced discount is enabled),\n \"rate_loc\": 4, (read-only if enhanced discount is enabled),\n \"rate_type_id\": 1,\n \"quantity\": 1,\n \"gross_budget_loc\": 5 (available if enhanced discount is enabled),\n \"gross_rate_loc\": 2 (available if enhanced discount is enabled),\n \"rate_type_name\": \"CPC\",\n \"is_added_value\": 1,\n \"est_cost\": 123,\n \"est_cost_loc\": 777,\n \"margin\": 3,\n \"cost_adjustment\": 10,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" } (You can't update formula custom fields via the API.),\n \"quantity_type\": \"Impressions\",\n \"inventory\": {\n \"item_id\": 934,\n \"_destroy\": true,\n \"add_as\": \"reserved\",\n \"recalculation_by\": \"budget\",\n \"periods\": [\n {\n \"id\": 94497,\n \"quantity\": 1,\n \"_destroy\": true\n },\n {\n \"id\": 94498,\n \"quantity\": 2\n }\n ]\n },\n \"discounts\": [\n {\n \"id\": 10,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n","responses":{"202":{"description":"creates media plan line item","schema":{"$ref":"#/definitions/media_plan_line_item_response"}},"422":{"description":"when custom fields with datetime type are invalid","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/media_plans/{media_plan_id}":{"get":{"summary":"Get a single Media Plan","tags":["Media Plans"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"media_plan_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/media_plans/1\n\n Gross fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/media_plans_response"}}}},"put":{"summary":"Update single Media Plan","tags":["Media Plans"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"media_plan_id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"media_plan":{"type":"object","properties":{"deal_id":{"type":"integer"},"owner_id":{"type":"integer"},"name":{"type":"string"},"budget_goal":{"type":"number","description":"Budget in USD","x-nullable":true},"budget_goal_loc":{"type":"number","description":"Local currency budget"},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"margin":{"type":"integer","x-nullable":true},"status":{"type":"string","x-nullable":true},"is_primary":{"type":"boolean","x-nullable":true},"is_current":{"type":"boolean","x-nullable":true},"is_locked":{"type":"boolean","x-nullable":true},"rate_card_id":{"type":"integer"},"cost":{"type":"string","x-nullable":true},"cost_loc":{"type":"string","x-nullable":true},"created_by":{"type":"integer","x-nullable":true},"updated_by":{"type":"integer","x-nullable":true},"discounts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"Discount ID"},"percentage":{"type":"number","x-nullable":true,"description":"Discount percentage"}}}}},"required":["deal_id","owner_id","name","rate_card_id"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"media_plan\":\n {\n \"owner_id\": 2,\n \"name\": \"New media plan\",\n \"budget_goal\": 1,\n \"budget_goal_loc\": 400,\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2019-12-31\",\n \"margin\": 100,\n \"status\": \"status\",\n \"is_primary\": true,\n \"is_current\": false,\n \"is_locked\": true,\n \"rate_card_id\": 3,\n \"cost\": 1,\n \"cost_loc\": 400,\n \"created_by\": 76,\n \"updated_by\": 76,\n \"discounts\": [\n {\n \"id\": 1,\n \"percentage\": 10.00\n }\n ]\n Discount fields are available only if the enhanced discounts setting is enabled\n }\n }\n","responses":{"202":{"description":"when required params","schema":{"$ref":"#/definitions/media_plans_response"}},"422":{"description":"when discount percentage is empty","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/merge_accounts":{"post":{"summary":"Merge Accounts","tags":["Merge Accounts"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"retained_account":{"type":"integer","required":true},"merged_accounts":{"type":"array","items":{"type":"integer"}},"merge_settings":{"type":"array","items":{"type":"string"}},"required":["retained_account","merged_account"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\n \"retained_account\": \"Retained Account ID\" (required),\n \"merged_accounts\":[\"Merged Account 1 ID\",\"Merged Account 2 ID\"] (at least one required),\n \"merge_settings\": [\"contacts\",\"agencies_advertisers\",\"related_agency_contacts\",\"other_accounts\",\"related_other_account_contacts\",\"team_split\"]\n }\n","responses":{"200":{"description":"Merge Accounts with success","schema":{"$ref":"#/definitions/merge_account_response"}},"422":{"description":"when retained neither agency nor advertiser"}}}},"/api/transactions":{"get":{"summary":"Get a paginated list of transactions","tags":["Merge Accounts"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 20)"}],"responses":{"200":{"description":"when per and page params are sent","schema":{"type":"array","items":{"$ref":"#/definitions/client_merge_transaction_response"}}}}}},"/api/transactions/{id}":{"get":{"summary":"Get a single transaction","tags":["Merge Accounts"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","description":"Merge Transaction id","required":true}],"description":" Example of Request\n\n http://localhost/api/transactions/1\n","responses":{"200":{"description":"get transaction","schema":{"$ref":"#/definitions/client_merge_transaction_response"}},"404":{"description":"error if not found"}}}},"/api/pmps":{"post":{"summary":"Create a single Pmp","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Deal"},"start_date":{"type":"string","format":"date","description":"Start date of the Deal"},"end_date":{"type":"string","format":"date","description":"End date of the Deal"},"deal_id":{"type":"integer","description":"ID of the Deal"},"currency":{"type":"string","description":"ISO code for Deal currency"},"advertiser_id":{"type":"integer","description":""},"agency_id":{"type":"integer","x-nullable":true,"description":""},"pmp_members_attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"from_date":{"type":"string","x-nullable":true},"to_date":{"type":"string","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true}}}}}},"required":["name","start_date","end_date","advertiser_id"]}}}],"tags":["Pmps"],"consumes":["application/json"],"produces":["application/json"],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp\":\n {\n \"start_date\": \"2020-01-01\" (required),\n \"end_date\": \"2021-01-01\" (required),\n \"name\": \"Segmant\" (required),\n \"deal_id\": 1,\n \"advertiser_id\": 2 (required),\n \"agency_id\": 3,\n \"currency\": 'USD',\n \"pmp_members_attributes\": [\n { email: \"1@2.com\",\n share: 50,\n from_date: '2020-01-01',\n to_date: '2021-01-01',\n seller_type: 'direct'\n }\n ]\n }\n }\n\n","responses":{"201":{"description":"Creates a pmp with success","schema":{"$ref":"#/definitions/pmp_response"}},"422":{"description":"when advertiser_id or agency_id is wrong","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Pmps","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"tags":["Pmps"],"consumes":["application/json"],"produces":["application/json"],"description":" Example of Request\n http://localhost/api/pmps?ids=1,2,3\n http://localhost/api/pmps?page=5&per=2\n http://localhost/api/pmps?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/pmps?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/pmps?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/pmps?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n http://localhost/api/pmps?created_at_start=2018-01-01&created_at_end=2018-02-02\n\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists by ids","schema":{"type":"array","items":{"$ref":"#/definitions/pmp_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/pmps/{pmp_id}":{"delete":{"summary":"Delete single Pmp","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","description":"Unique ID for the Pmp","required":true}],"tags":["Pmps"],"consumes":["application/json"],"produces":["application/json"],"description":" Example of Request\n\n http://localhost:4200/api/pmps/1\n\n","responses":{"200":{"description":"delete item"}}},"get":{"summary":"Get a single Pmp","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","required":true}],"tags":["Pmps"],"consumes":["application/json"],"produces":["application/json"],"description":" Example of Request\n\n http://localhost:4200/api/pmps/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/pmp_response"}}}},"put":{"summary":"Update a single Pmp","security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","description":"Unique ID for the Pmp","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Deal"},"start_date":{"type":"string","format":"date","description":"Start date of the Deal"},"end_date":{"type":"string","format":"date","description":"End date of the Deal"},"deal_id":{"type":"integer","description":"ID of the Deal"},"currency":{"type":"string","description":"ISO code for Deal currency"},"advertiser_id":{"type":"integer","description":""},"agency_id":{"type":"integer","x-nullable":true,"description":""},"pmp_members_attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"from_date":{"type":"string","x-nullable":true},"to_date":{"type":"string","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true}}}}}}}}}],"tags":["Pmps"],"consumes":["application/json"],"produces":["application/json"],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp\":\n {\n \"start_date\": \"2020-01-01\" (required),\n \"end_date\": \"2021-01-01\" (required),\n \"name\": \"Segmant\" (required),\n \"deal_id\": 1,\n \"advertiser_id\": 2 (required),\n \"agency_id\": 3,\n \"currency\": 'USD',\n \"pmp_members_attributes\": [\n { email: \"1@2.com\",\n share: 50,\n from_date: '2020-01-01',\n to_date: '2021-01-01',\n seller_type: 'overlay',\n product_id: 1\n }\n ]\n }\n }\n","responses":{"202":{"description":"when required params ","schema":{"$ref":"#/definitions/pmp_response"}},"422":{"description":"when pmp_members_attributes have invalid share","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/pmps/{pmp_id}/pmp_items/{pmp_item_id}/pmp_item_daily_actuals":{"post":{"summary":"Create a single Pmp Item Daily Actual","tags":["Pmp Item Daily Actuals"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp_item_daily_actual":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Date"},"ad_unit":{"type":"integer","description":"Ad Unit for the PMP Daily Actual"},"ad_requests":{"type":"integer","description":"Requests"},"impressions":{"type":"integer","description":"Impressions from the daily actual"},"cpm":{"type":"integer","description":"eCPM in local currency"},"cpm_net":{"type":"integer","x-nullable":true,"description":"Net eCPM in local currency"},"ssp_advertiser":{"type":"string","x-nullable":true,"description":"Name of the advertiser from the SSP"},"win_rate":{"type":"integer","x-nullable":true,"description":"Win rate of the daily actual"},"revenue_loc":{"type":"integer","x-nullable":true,"description":"Gross revenue of the daily actual in local currency"},"revenue_net_loc":{"type":"integer","x-nullable":true,"description":"Net revenue of the daily actual in local currency"},"advertiser_id":{"type":"integer","x-nullable":true,"description":"ID of the advertiser in Boostr"}},"required":["date","ad_unit","ad_requests","impressions","cpm"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp_item_daily_actual\":\n {\n \"date\": \"2019-05-28\" (required),\n \"ad_unit\": 2,\n \"ad_requests\": 100 (required),\n \"impressions\": 200 (required),\n \"cpm\": 100 (required),\n \"cpm_net\": 200,\n \"ssp_advertiser\": \"ssp_advertiser\",\n \"win_rate\": 5 (decimal value, not percentage),\n \"revenue_loc\": 150,\n \"revenue_net_loc\": 200,\n \"advertiser_id\": 1\n }\n }\n","responses":{"201":{"description":"when ad_unit is empty","schema":{"$ref":"#/definitions/pmp_item_daily_actual_response"}},"422":{"description":"when advertiser_id not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a collection of Daily Actuals grouped by Pmp Item","tags":["Pmp Item Daily Actuals"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"security":[{"Bearer":{}}],"description":" Example of Request\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?ids=1,2,3\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?page=5&per=2\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/pmp/1/pmp_items/2/pmp_item_daily_actuals?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get lists by ids","schema":{"type":"array","items":{"$ref":"#/definitions/pmp_item_daily_actual_response"}}},"422":{"description":"when pmp_item not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/pmps/{pmp_id}/pmp_items/{pmp_item_id}/pmp_item_daily_actuals/{id}":{"delete":{"summary":"Delete a single Pmp Item Daily Actual","tags":["Pmp Item Daily Actuals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/pmps/1/pmp_items/2/pmp_item_daily_actual/3\n\n","responses":{"204":{"description":"get item"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Pmp Item Daily Actual","tags":["Pmp Item Daily Actuals"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/pmps/1/pmp_items/2/pmp_item_daily_actual/3\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/pmp_item_daily_actual_response"}},"404":{"description":"when id not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Pmp Item Daily Actual","tags":["Pmp Item Daily Actuals"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp_item_daily_actual":{"type":"object","properties":{"date":{"type":"string","x-nullable":true,"format":"date","description":"Date"},"ad_unit":{"type":"integer","x-nullable":true,"description":"Ad Unit for the PMP Daily Actual"},"ad_requests":{"type":"integer","x-nullable":true,"description":"Requests"},"impressions":{"type":"integer","x-nullable":true,"description":"Impressions from the daily actual"},"cpm":{"type":"integer","x-nullable":true,"description":"eCPM in local currency"},"cpm_net":{"type":"integer","x-nullable":true,"description":"Net eCPM in local currency"},"ssp_advertiser":{"type":"integer","x-nullable":true,"description":"Name of the advertiser from the SSP"},"win_rate":{"type":"integer","x-nullable":true,"description":"Win rate of the daily actual"},"revenue_loc":{"type":"integer","x-nullable":true,"description":"Gross revenue of the daily actual in local currency"},"revenue_net_loc":{"type":"integer","x-nullable":true,"description":"Net revenue of the daily actual in local currency"},"advertiser_id":{"type":"integer","x-nullable":true,"description":"ID of the advertiser in Boostr"}}}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp_item_daily_actual\":\n {\n \"date\": \"2019-05-28\",\n \"ad_unit\": 2,\n \"ad_requests\": 100,\n \"impressions\": 200,\n \"cpm\": 100,\n \"cpm_net\": 200,\n \"ssp_advertiser\": \"ssp_advertiser\",\n \"win_rate\": 5 (decimal value, not percentage),\n \"revenue_loc\": 150,\n \"revenue_net_loc\": 200,\n \"advertiser_id\": 1\n }\n }\n","responses":{"200":{"description":"when ad_unit is empty","schema":{"$ref":"#/definitions/pmp_item_daily_actual_response"}},"422":{"description":"when advertiser_id not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/pmps/{pmp_id}/pmp_items":{"post":{"summary":"Create a single Pmp Item","tags":["Pmp Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp_item":{"type":"object","properties":{"pmp_type_id":{"type":"integer","description":"ID of the PMP that the PMP Item belongs to"},"product_id":{"type":"integer","description":"ID of the Product"},"ssp_id":{"type":"integer","description":"ID of the SSP"},"ssp_deal_id":{"type":"integer","description":"Deal ID from the SSP"},"budget_loc":{"type":"integer","description":"Gross budget of the PMP in local currency"},"custom_fields":{"type":"object","x-nullable":true}},"required":["pmp_type_id","product_id","ssp_id","ssp_deal_id"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp_item\":\n {\n \"pmp_type_id\": 1 (required),\n \"product_id\": 2(required),\n \"ssp_id\": 3 (required),\n \"ssp_deal_id\": 4 (required),\n \"budget_loc\": 100 (required),\n \"custom_fields\": { \"label1\": \"value1\", \"label2\": \"value2\" }\n }\n }\n","responses":{"422":{"description":"when budget_loc is empty","schema":{"$ref":"#/definitions/errors_object"}},"201":{"description":"when budget_loc is not numeric","schema":{"$ref":"#/definitions/pmp_item_response"}}}},"get":{"summary":"Get a collection of Items grouped by Pmp","tags":["Pmp Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"security":[{"Bearer":{}}],"description":" Example of Request\n http://localhost/api/pmps/1/pmp_items?ids=1,2,3\n http://localhost/api/pmps/1/pmp_items?page=5&per=2\n http://localhost/api/pmps/1/pmp_items?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/pmps/1/pmp_items?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/pmps/1/pmp_items?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/pmps/1/pmp_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get list by ids","schema":{"type":"array","items":{"$ref":"#/definitions/pmp_item_response"}}},"422":{"description":"when pmp_id not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/pmps/{pmp_id}/pmp_items/{pmp_item_id}":{"delete":{"summary":"Delete a single Pmp Item","tags":["Pmp Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/pmps/2/pmp_items/1\n\n","responses":{"204":{"description":"delete item"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Pmp Item","tags":["Pmp Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/pmps/2/pmp_items/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/pmp_item_response"}},"422":{"description":"when id not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Pmp Item","tags":["Pmp Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pmp_id","in":"path","type":"integer","required":true},{"name":"pmp_item_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"pmp_item":{"type":"object","properties":{"pmp_type_id":{"type":"integer","description":"ID of the PMP that the PMP Item belongs to"},"product_id":{"type":"integer","description":"ID of the Product"},"ssp_id":{"type":"integer","description":"ID of the SSP"},"ssp_deal_id":{"type":"integer","description":"Deal ID from the SSP"},"budget_loc":{"type":"integer","description":"Gross budget of the PMP in local currency"},"custom_fields":{"type":"object","x-nullable":true}},"required":["pmp_type_id","product_id","ssp_id","ssp_deal_id"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"pmp_item\":\n {\n \"pmp_type_id\": 1,\n \"product_id\": 2,\n \"ssp_id\": 3,\n \"ssp_deal_id\": 4,\n \"budget_loc\": 100,\n \"custom_fields\": { \"label1\": \"value1\", \"label2\": \"value2\" }\n }\n }\n","responses":{"422":{"description":"when ssp not found","schema":{"$ref":"#/definitions/errors_object"}},"200":{"description":"when budget_loc is not numeric","schema":{"$ref":"#/definitions/pmp_item_response"}}}}},"/api/products":{"get":{"summary":"Get collection of products","tags":["Product Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"order_by","in":"query","type":"string","description":"ASC | DESC"},{"name":"sort_by","in":"query","type":"string","description":"Name of field to SORT_BY"}],"description":" Example of Request\n http://localhost/api/products?ids=1,2,3\n http://localhost/api/products?page=5&per=2\n http://localhost/api/products?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/products?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/products?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/products?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"return empty array","schema":{"type":"array","items":{"$ref":"#/definitions/product_response"}}},"422":{"description":"when invalid order_by and sort_by params","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/products/{product_id}":{"get":{"summary":"Get a single product","tags":["Product Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"product_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/products/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/product_response"}},"404":{"description":"when item not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Product","tags":["Product Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"product_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"product":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Product"},"rate_type_id":{"type":"string","description":"ID of Rate Type"},"revenue_type":{"type":"string","description":"Type of Revenue"},"active":{"type":"boolean"},"margin":{"type":"string"},"product_family":{"type":"string"},"show_in_forecast":{"type":"boolean"},"pg_enabled":{"type":"boolean","x-nullable":true},"ad_server_creative_sizes_attributes":{"type":"object"},"custom_field_attributes":{"type":"object"}}}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"product\":\n {\n \"name\": \"Test Name\",\n \"rate_type_id\": 1,\n \"revenue_type\": \"Revenue Type\",\n \"active\": true,\n \"margin\": 2,\n \"product_family\": \"Product Family\",\n \"show_in_forecast\": true,\n \"pg_enabled\": true,\n \"custom_field_attributes\": { \"string1\": \"Product\" },\n \"ad_server_creative_sizes_attributes\": [\n { \"width\": 300, \"height\": 300, \"count\": 3, \"amp_only\": true,\n \"native_media_orientation\": 'Square', \"ad_server_targeting_template_id\": 1 }\n ],\n }\n }\n","responses":{"200":{"description":"when params have nil values","schema":{"$ref":"#/definitions/product_response"}},"422":{"description":"when product family not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/quotas":{"get":{"summary":"Get collection of Quotas","tags":["Quotas"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"},{"name":"user_id","in":"query","type":"integer","description":"id of user"}],"description":" Example of Request\n http://localhost/api/quotas?ids=1,2,3\n http://localhost/api/quotas?page=5&per=2\n http://localhost/api/quotas?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/quotas?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/quotas?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/quotas?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n http://localhost/api/quotas?user_id=1\n\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"returns quotes filtered by user_id","schema":{"type":"array","items":{"$ref":"#/definitions/quota_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/quotas/{id}":{"get":{"summary":"Get a single Quota","tags":["Quotas"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/quotas/1\n\n","responses":{"200":{"description":"when product type is product_family","schema":{"$ref":"#/definitions/quota_response"}},"404":{"description":"when quota not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/rate_cards":{"get":{"summary":"Get collection of Rate Cards","tags":["Rate Cards"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/rate_cards?ids=1,2,3\n http://localhost/api/rate_cards?page=5&per=2\n http://localhost/api/rate_cards?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/rate_cards?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/rate_cards?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/rate_cards?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get list by ids","schema":{"type":"array","items":{"$ref":"#/definitions/rate_card_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/rate_cards/{rate_card_id}":{"get":{"summary":"Get a single Rate Card","tags":["Rate Cards"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"rate_card_id","in":"path","type":"integer","required":true}],"description":" Example of Request\n\n http://localhost/api/rate_card/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/rate_card_response"}},"422":{"description":"when item not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/reports/items":{"post":{"summary":"Create or Update Report Item","tags":["Report Item"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"report_item":{"type":"object","properties":{"report_unit_id":{"type":"integer","x-nullable":false,"description":"Report Unit ID"},"data":{"type":"array","items":{"type":"object"}}}},"required":["report_unit_id","data"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"report_item\":\n {\n \"report_unit_id\": 1,\n \"data\": [{count: 100, curr: 'usd'}, {count: 20}]\n }\n }\n\n","responses":{"201":{"description":"when required params "}}},"delete":{"summary":"Delete Report Items","tags":["Report Item"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"}},"report_item":{"type":"object","properties":{"report_unit_id":{"type":"integer","x-nullable":false,"description":"Report Unit ID"}}},"required":["report_unit_id","ids"]}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"report_item\":\n {\n \"report_unit_id\": 1\n },\n \"ids\": [1,2]\n }\n\n","responses":{"204":{"description":"when required params "}}}},"/api/settings/inventory_managements/attribute_categories":{"post":{"summary":"Create Attribute Categories","tags":["Inventory Attribute Categories"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"attribute_categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"active":{"type":"string"},"description":{"type":"string","x-nullable":true}},"required":["name","active"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n attribute_categories: [\n {\n \"name\": \"Attribute Category Name 1\"(required),\n \"active\": \"true\"(required),\n \"description\": \"Description 1\"\n },\n {\n \"name\": \"Attribute Category Name 2\"(required),\n \"active\": \"true\"(required),\n \"description\": \"Description 2\"\n }\n ]\n }\n","responses":{"201":{"description":"when required params ","schema":{"$ref":"#/definitions/inventory_attribute_categories/create_response"}},"422":{"description":"when Name is empty and has valid Category","schema":{"$ref":"#/definitions/inventory_attribute_categories/create_with_error_response"}}}},"get":{"summary":"Get a paginated list of Attribute Categories","tags":["Inventory Attribute Categories"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 100)"},{"name":"q","in":"query","type":"string","description":"query string"},{"name":"active","in":"query","type":"string","description":"active"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/settings/inventory_managements/attribute_categories?ids=1,2,3\n /api/settings/inventory_managements/attribute_categories?q=name&active=true\n","responses":{"200":{"description":"get a list of Attribute Categories","schema":{"type":"array","items":{"$ref":"#/definitions/inventory_attribute_categories_response"}}}}}},"/api/settings/inventory_managements/attribute_categories/{id}":{"delete":{"summary":"Delete a single Inventory Attribute Category","tags":["Inventory Attribute Categories"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/settings/inventory_managements/attribute_categories/1\n","responses":{"204":{"description":"delete a single Inventory Attribute Category"}}},"put":{"summary":"Update a single Inventory Attribute Category","tags":["Inventory Attribute Categories"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","x-nullable":true},"active":{"type":"string","x-nullable":true},"description":{"type":"string","x-nullable":true}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"name\": \"Attribute Category Name\",\n \"active\": \"true\",\n \"description\": \"Description\"\n }\n","responses":{"202":{"description":"when correct params ","schema":{"$ref":"#/definitions/inventory_attribute_categories_response"}}}}},"/api/settings/inventory_managements/attributes":{"post":{"summary":"Create Inventory Attributes","tags":["Inventory Attributes"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"active":{"type":"string"},"description":{"type":"string","x-nullable":true},"category":{"type":"integer","x-nullable":true}},"required":["name","active"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n attributes: [\n {\n \"name\": \"Attribute Name1 \"(required),\n \"active\": \"true\"(required),\n \"description\": \"Description 1\",\n \"category\": 1\n },\n {\n \"name\": \"Attribute Name 2\"(required),\n \"active\": \"true\"(required),\n \"description\": \"Description 2\",\n \"category\": 2\n }\n ]\n }\n","responses":{"201":{"description":"when required params ","schema":{"$ref":"#/definitions/inventory_attributes/create_response"}},"422":{"description":"when Name is empty and has valid Category","schema":{"$ref":"#/definitions/inventory_attributes/create_with_error_response"}}}},"get":{"summary":"Get a paginated list of Inventory Attributes","tags":["Inventory Attributes"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 100)"},{"name":"q","in":"query","type":"string","description":"query string"},{"name":"active","in":"query","type":"string","description":"active"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/settings/inventory_managements/attributes?ids=1,2,3\n /api/settings/inventory_managements/attributes?q=name&active=true\n","responses":{"200":{"description":"get a list of Attributes by ids","schema":{"type":"array","items":{"$ref":"#/definitions/inventory_attributes_response"}}}}}},"/api/settings/inventory_managements/attributes/{id}":{"delete":{"summary":"Delete a single Inventory Attribute","tags":["Inventory Attributes"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/settings/inventory_managements/attributes/1\n","responses":{"204":{"description":"delete a single Inventory Attribute Category"}}},"put":{"summary":"Update a single Inventory Attribute","tags":["Inventory Attributes"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","x-nullable":true},"active":{"type":"string","x-nullable":true},"description":{"type":"string","x-nullable":true},"category":{"type":"string","x-nullable":true}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"name\": \"Attribute Name\",\n \"active\": \"true\",\n \"description\": \"Description\",\n \"category\": 0\n }\n","responses":{"202":{"description":"when correct params ","schema":{"$ref":"#/definitions/inventory_attributes_response"}}}}},"/api/settings/inventory_managements/items/{item_id}/available_periods":{"post":{"summary":"Create Inventory Item Periods","tags":["Inventory Item Periods"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"item_id","in":"path","type":"integer","description":"id of inventory item","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"start_date":{"type":"string","description":"YYYY-MM-DD"},"end_date":{"type":"string","description":"YYYY-MM-DD"},"total_available_quantity":{"type":"integer"},"max_quantity_per_deal":{"type":"integer"},"distributed_booking":{"type":"boolean"},"attributes":{"x-nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"total_available_quantity":{"type":"integer"}}}}},"required":["start_date","end_date","total_available_quantity","max_quantity_per_deal","distributed_booking"]}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n periods: [\n {\n \"start_date\": \"2020-01-01\", (required)\n \"end_date\": \"2020-10-01\", (required)\n \"total_available_quantity\": 100, (required)\n \"max_quantity_per_deal\": 10,\n \"distributed_booking\": true (required)\n \"attributes\": [\n\t {\n \"id\": 1,\n \"total_available_quantity\": 50\n }\n ]\n }\n ]\n }\n","responses":{"201":{"description":"when required params ","schema":{"$ref":"#/definitions/inventory_available_periods/create_with_error_response"}},"422":{"description":"when start_date is incorrect ","schema":{"$ref":"#/definitions/inventory_attributes/create_with_error_response"}}}},"get":{"summary":"Get a paginated list of Inventory Items Periods","tags":["Inventory Item Periods"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 100)"},{"name":"q","in":"query","type":"string","description":"query string"},{"name":"active","in":"query","type":"string","description":"active"},{"name":"item_id","in":"path","type":"integer","required":true},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/settings/inventory_managements/items/available_periods?ids=1,2,3\n /api/settings/inventory_managements/items/available_periods?q=name&active=true\n","responses":{"200":{"description":"get a list of Attribute Categories by ids","schema":{"type":"array","items":{"$ref":"#/definitions/inventory_available_periods_response"}}}}}},"/api/settings/inventory_managements/items/{item_id}/available_periods/{id}":{"delete":{"summary":"Delete a single Inventory Item Period","tags":["Inventory Item Periods"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"item_id","in":"path","type":"integer","required":true},{"name":"id","in":"path","type":"integer","required":true}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/settings/inventory_managements/items/1/available_periods/1\n","responses":{"204":{"description":"delete a single Available Periods"}}},"put":{"summary":"Update a single Inventory Item Period","tags":["Inventory Item Periods"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"item_id","in":"path","type":"integer","description":"id of inventory item","required":true},{"name":"id","in":"path","type":"integer","description":"id of available period","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"start_date":{"type":"string","x-nullable":true,"description":"YYYY-MM-DD"},"end_date":{"type":"string","x-nullable":true,"description":"YYYY-MM-DD"},"total_available_quantity":{"type":"integer","x-nullable":true},"max_quantity_per_deal":{"type":"integer","x-nullable":true},"distributed_booking":{"type":"boolean","x-nullable":true},"attributes":{"x-nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"total_available_quantity":{"type":"integer","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"start_date\": \"2020-01-01 11:20:50\",\n \"end_date\": \"2020-10-01 22:11:12\",\n \"total_available_quantity\": 100,\n \"max_quantity_per_deal\": 10,\n \"distributed_booking\": true\n \"attributes\": [\n {\n \"id\": 1,\n \"total_available_quantity\": 50 (required)\n },\n {\n \"id\": 2,\n \"_destroy\": true\n }\n ]\n }\n","responses":{"202":{"description":"when required params ","schema":{"$ref":"#/definitions/inventory_available_period_response"}},"422":{"description":"when removes booked attribute","schema":{"$ref":"#/definitions/inventory_available_periods/update_errors_response"}}}}},"/api/settings/inventory_managements/items":{"post":{"summary":"Create Inventory Items","tags":["Inventory Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"periods":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"color":{"type":"string","x-nullable":true},"active":{"type":"boolean","x-nullable":true},"time_period_increment":{"type":"string","x-nullable":true},"time_period_schedule_type":{"type":"string"},"max_consecutive_periods_per_deal":{},"categories_attributes":{"type":"array","x-nullable":true,"items":{"id":{"type":"number"},"name":{"type":"string","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true}}},"product_attributes":{"type":"array","x-nullable":true,"items":{"id":{"type":"number"}}}}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"items\": [\n {\n \"name\": \"Inventory Item Name\",\n \"description\": \"Description\",\n \"color\": \"#a880ff\",\n \"active\": true,\n \"time_period_increment\": \"day\",\n \"time_period_schedule_type\": \"per_period\",\n \"max_consecutive_periods_per_deal\": 2,\n \"categories_attributes\": [ {\"id\": 1, \"name\": \"DMA\"}, {\"id\": 2, \"name\": \"Demographics\"} ],\n \"product_attributes\": [ {\"id\": 1}, {\"id\": 2 } ]\n }\n ]\n }\n\n","responses":{"201":{"description":"when correct params ","schema":{"$ref":"#/definitions/inventory_items_response"}},"422":{"description":"when a time_period_schedule_type value is incorrect","schema":{"$ref":"#/definitions/inventory_items_response/create_with_error_response"}}}},"get":{"summary":"Get a paginated list of Inventory Items","tags":["Inventory Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"q","in":"query","type":"string","description":"query string"},{"name":"active","in":"query","type":"string","description":"active"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 100)"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n /api/settings/inventory_managements/items?ids=1,2,3\n /api/settings/inventory_managements/items?q=name&active=1\n","responses":{"200":{"description":"get a list of Inventory Items by ids","schema":{"type":"array","items":{"$ref":"#/definitions/inventory_attribute_items_response"}}}}}},"/api/settings/inventory_managements/items/{id}":{"delete":{"summary":"Delete a single Inventory Item","tags":["Inventory Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/settings/inventory_managements/items/1\n","responses":{"204":{"description":"delete a single Inventory Item"}}},"put":{"summary":"Update a single Inventory Item","tags":["Inventory Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"path","type":"integer","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","x-nullable":true},"description":{"type":"string","x-nullable":true},"color":{"type":"string","x-nullable":true},"active":{"type":"boolean","x-nullable":true},"time_period_increment":{"type":"string","x-nullable":true},"max_consecutive_periods_per_deal":{"type":"number","x-nullable":true},"categories_attributes":{"type":"array","x-nullable":true,"items":{"id":{"type":"number"},"name":{"type":"string","x-nullable":true},"_destroy":{"type":"boolean","x-nullable":true}}}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"name\": \"Inventory Item Name\",\n \"description\": \"Description\",\n \"color\": \"#a880ff\",\n \"active\": true,\n \"time_period_increment\": \"day\",\n\t \"time_period_schedule_type\": \"per_period\",\n\t \"max_consecutive_periods_per_deal\": 2,\n\t \"categories_attributes\": [\n {\"id\": 1, \"name\": \"DMA\"},\n {\"id\": 2, \"name\": \"Demographics\"},\n {\"id\": 3, \"_destroy\": true}\n ],\n \"product_attributes\": [\n {\"id\": 1},\n {\"id\": 2, \"_destroy\": true }\n ]\n }\n\n","responses":{"202":{"description":"when correct params ","schema":{"$ref":"#/definitions/inventory_item_response"}},"422":{"description":"when a color value is incorrect","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/agreements/":{"post":{"summary":"Create a single Agreement","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"agreement":{"type":"object","properties":{"name":{"type":"string","description":"Name of Agreement"},"start_date":{"type":"number","description":"Start Date of Agreement"},"end_date":{"type":"number","description":"End Date of Agreement"},"type":{"type":"string","description":"Type of the Agreement"},"status":{"type":"string","description":"Status of the Agreement"},"auto_track":{"type":"boolean","x-nullable":true},"agency_holding":{"type":"string","description":"Agency Holding of Agreement","x-nullable":true},"advertisers":{"type":"array","description":"Array of Advertiser Names","x-nullable":true,"items":{"type":"string"}},"agencies":{"type":"array","description":"Array of Agency Names","x-nullable":true,"items":{"type":"string"}},"parent_companies":{"type":"array","description":"Array of Parent Company Names","x-nullable":true,"items":{"type":"string"}},"target":{"type":"number","description":"Total budget of the Agreement","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true}},"required":["name","start_date","end_date","type","status"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"agreement\":\n {\n \"name\": \"Name of Agreement\" (required),\n \"start_date\": \"2019-01-01\" (required),\n \"end_date\": \"2019-02-01\" (required),\n \"type\": \"type\" (required),\n \"status\": \"status\" (required),\n \"auto_track\": true,\n \"agency_holding\": \"Name of Agency Holding\",\n \"advertisers\": [\"Name1\", \"Name2\"],\n \"agencies\": [\"Name1\", \"Name2\"],\n \"parent_companies\": [\"Name1\", \"Name2\"],\n \"target\": 100,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"201":{"description":"when required params","schema":{"$ref":"#/definitions/agreement_response"}},"422":{"description":"when parent_company not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/agreements/{id}":{"delete":{"summary":"Delete a single Agreement","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/agreements/3\n\n","responses":{"204":{"description":"delete a single agreement"},"404":{"description":"when record not found","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a single Agreement","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/agreements/1\n\n","responses":{"200":{"description":"get agreement","schema":{"$ref":"#/definitions/agreement_response"}},"404":{"description":"when agreement not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single Agreement","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","description":"Unique ID for the Agreement","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"agreement":{"type":"object","properties":{"name":{"type":"string","description":"Name of Agreement","x-nullable":true},"start_date":{"type":"number","description":"Start Date of Agreement","x-nullable":true},"end_date":{"type":"number","description":"End Date of Agreement","x-nullable":true},"type":{"type":"string","description":"Type of the Agreement","x-nullable":true},"status":{"type":"string","description":"Status of the Agreement","x-nullable":true},"auto_track":{"type":"boolean","x-nullable":true},"agency_holding":{"type":"string","description":"Agency Holding of Agreement","x-nullable":true},"target":{"type":"number","description":"Total budget of the Agreement","x-nullable":true},"advertisers":{"type":"array","description":"Array of Advertiser Names","x-nullable":true,"items":{"type":"string"}},"agencies":{"type":"array","description":"Array of Agency Names","x-nullable":true,"items":{"type":"string"}},"parent_companies":{"type":"array","description":"Array of Parent Company Names","x-nullable":true,"items":{"type":"string"}},"custom_fields":{"type":"object","x-nullable":true}},"required":["name","start_date","end_date","type","status"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"agreement\":\n {\n \"name\": \"Name of Agreement\",\n \"start_date\": \"2019-01-01\",\n \"end_date\": \"2019-02-01\",\n \"type\": \"type\",\n \"status\": \"status\",\n \"auto_track\": true,\n \"agency_holding\": \"Name of Agency Holding\",\n \"advertisers\": [\"Name1\", \"Name2\"],\n \"agencies\": [\"Name1\", \"Name2\"],\n \"parent_companies\": [\"Name1\", \"Name2\"],\n \"target\": 100,\n \"custom_fields\": { \"label\": \"value\", \"label2\": \"value2\" }\n }\n }\n","responses":{"200":{"description":"when update only name","schema":{"$ref":"#/definitions/agreement_response"}},"422":{"description":"when parent_company not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/agreements":{"get":{"summary":"Get collection of Agreements","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/agreements?ids=1,2,3\n http://localhost/api/agreements?page=5&per=2\n http://localhost/api/agreements?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/agreements?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/agreements?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/agreements?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get list by ids","schema":{"type":"array","items":{"$ref":"#/definitions/agreement_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/agreement_statuses":{"get":{"summary":"Get available statuses for Agreements","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/agreement_statuses\n http://localhost/api/agreement_statuses?ids=1,2,3\n","responses":{"200":{"description":"get available values for Agreement Status by ids","schema":{"type":"array","items":{"$ref":"#/definitions/simple_response"}}}}}},"/api/agreement_types":{"get":{"summary":"Get available types for Agreements","tags":["Agreements"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/agreement_types\n\n","responses":{"200":{"description":"get available types for Agreements by ids","schema":{"type":"array","items":{"$ref":"#/definitions/simple_response"}}}}}},"/api/stages":{"get":{"summary":"Get collection of stages","tags":["Stage Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/stages?ids=1,2,3\n http://localhost/api/stages?page=5&per=2\n http://localhost/api/stages?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/stages?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/stages?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/stages?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get list by ids","schema":{"type":"array","items":{"$ref":"#/definitions/stage_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/stages/{stage_id}":{"get":{"summary":"Get a single stage","tags":["Stage Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"stage_id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/stages/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/stage_response"}},"422":{"description":"when item not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/teams":{"get":{"summary":"Get collection of Teams","tags":["Teams"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/teams?ids=1,2,3\n http://localhost/api/teams?page=5&per=2\n http://localhost/api/teams?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/teams?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/teams?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/teams?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n Rate Cards are only returned for OMS enabled companies\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get a list of teams with deleted","schema":{"type":"array","items":{"$ref":"#/definitions/team_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/teams/{id}":{"get":{"summary":"Get a single Team","tags":["Teams"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/teams/1\n\n Rate Cards are only returned for OMS enabled companies\n","responses":{"200":{"description":"show deleted team","schema":{"$ref":"#/definitions/team_response"}},"422":{"description":"when team not found","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/traffic_line_items":{"post":{"summary":"Create a Traffic Line Item","tags":["Traffic Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"traffic_line_item":{"type":"object","properties":{"io_line_item_id":{"type":"integer"},"traffic_order_id":{"type":"integer"},"custom_fields":{"type":"object","x-nullable":true}},"required":["io_line_item_id","traffic_order_id"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/traffic_line_items\n\n Body\n\n {\n \"traffic_line_item\": {\n \"io_line_item_id\": 54321,\n \"traffic_order_id\": 12345,\n \"custom_fields\": { // You can't update formula custom field via the API\n \"label\": \"value\",\n \"label2\": \"value2\"\n }\n }\n }\n","responses":{"201":{"description":"creates cf and does not rewrite cf for existed traffic li","schema":{"$ref":"#/definitions/traffic_line_items_response"}},"422":{"description":"returns error when try to update formula cf","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get a paginated list of Traffic line items","tags":["Traffic Line Items"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"traffic_order_id","in":"query","type":"integer","description":"id of traffic order"},{"name":"io_id","in":"query","type":"integer","description":"id of io"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"updated_at","in":"query","type":"date","description":"filter traffic line items by updated date value by updated (to setup condition use updated_at_condition param)"},{"name":"updated_at_condition","in":"query","type":"string","description":"filter traffic line items date condition <, >, <=, >=, = (for define value use :updated_at)"},{"name":"updated_at_start","in":"query","type":"date","description":"filter traffic line items by range updated_at_start..updated_at_end"},{"name":"updated_at_end","in":"query","type":"date","description":"filter traffic line items by range updated_at_start..updated_at_end"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"}],"description":" Example of Request\n /api/traffic_line_items?ids=1,2,3\n /api/traffic_line_items?page=5&per=2\n /api/traffic_line_items?updated_at=2019-02-02&updated_at_condition>=\n /api/traffic_line_items?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n","responses":{"200":{"description":"does not return boolean custom field with false value","schema":{"type":"array","items":{"$ref":"#/definitions/traffic_line_items_response"}}},"422":{"description":"when \"> \"","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/traffic_line_items/{id}":{"put":{"summary":"Update a Traffic Line Item","tags":["Traffic Line Items"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"traffic_line_item":{"type":"object","properties":{"io_line_item_id":{"type":"integer"},"traffic_order_id":{"type":"integer"},"availability_data":{"type":"object","properties":{"pushed_at":{"type":"string"},"error_message":{"type":"string"},"request_status":{"type":"string"}}},"ad_server_fields":{"type":"object"},"custom_fields":{"type":"object","x-nullable":true}}}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n /api/traffic_line_items/{id}\n\n Body\n {\n \"traffic_line_item\": {\n \"traffic_order_id\": 5,\n \"io_line_item_id\": 5,\n \"availability_data\": {\n \"pushed_at\": \"2023-04-20 10:09:40 UTC\",\n \"error_message\": \"Error\",\n \"request_status\": \"error\"\n },\n \"ad_server_fields\": {\n \"Product Price\": 10, // Integer field\n \"Ad Status\": true, // Boolean field\n \"Ad Price\": \"200.44\", // Number field\n \"Product Name\": \"Some test\", // String field\n \"Product Status\": \"Active\", // Select field\n \"Ad server field\": [\"Per 1000\"] // Multiselect field\n },\n \"custom_fields\": { // You can't update formula custom field via the API\n \"label\": \"value\",\n \"label2\": \"value2\"\n }\n }\n }\n","responses":{"200":{"description":"when custom field was already created","schema":{"$ref":"#/definitions/traffic_line_items_response"}},"422":{"description":"when custom fields with datetime type are invalid","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/user_token":{"post":{"summary":"Get token of user","tags":["User Token"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"auth":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]}}}}],"description":"\n Please note that only Admins may generate tokens.\n\n Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n\n {\"auth\":\n {\n \"email\": \"my@email.com\",\n \"password\": \"my password\"\n }\n }\n","responses":{"201":{"description":"when required params ","schema":{"$ref":"#/definitions/user_token_response"}},"422":{"description":"when company is inactive"},"404":{"description":"when user not found"}}}},"/api/users":{"post":{"summary":"Create a single User","tags":["Users"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"user":{"type":"object","properties":{"first_name":{"type":"string","description":"First Name of User"},"last_name":{"type":"string","description":"Last Name of User"},"email":{"type":"string","description":"Email address of the User"},"title":{"type":"string","description":"Title of the User"},"average_deal_size":{"type":"string","description":"Average Deal size of User"},"type":{"type":"string","description":"Type of User"},"is_active":{"type":"boolean","description":"True if user is active"}},"required":["first_name","last_name","email"]}}}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"user\": {\n \"first_name\": \"First Name\" (required),\n \"last_name\": \"Last Name\" (required),\n \"email\": \"email@email.com\" (required),\n \"title\": \"some title\",\n \"average_deal_size\": 3,\n \"type\": \"Default\",\n \"is_active\": true\n }\n }\n","responses":{"201":{"description":"only required params ","schema":{"$ref":"#/definitions/user_response"}},"422":{"description":"when type is invalid","schema":{"$ref":"#/definitions/errors_object"}}}},"get":{"summary":"Get collection of users","tags":["Users"],"consumes":["application/json"],"produces":["application/json"],"security":[{"Bearer":{}}],"parameters":[{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"id","in":"query","type":"integer","description":"id of object"},{"name":"ids","in":"query","type":"string","description":"comma-separated list of ids"},{"name":"page","in":"query","type":"integer","description":"number of page"},{"name":"per","in":"query","type":"integer","description":"items per page (default: 50, max: 300)"},{"name":"created_at","in":"query","type":"date","description":"Created Date of Item"},{"name":"created_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"updated_at","in":"query","type":"date","description":"Date of most recent update of Item"},{"name":"updated_at_condition","in":"query","type":"string","description":"<, >, <=, >=, =, default: ="},{"name":"created_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start(this)..end"},{"name":"created_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :created_at BETWEEN start..end(this)"},{"name":"updated_at_start","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start(this)..end"},{"name":"updated_at_end","in":"query","type":"date","description":"'YYYY-MM-DD' :updated_at BETWEEN start..end(this)"}],"description":" Example of Request\n http://localhost/api/users?ids=1,2,3\n http://localhost/api/users?page=5&per=2\n http://localhost/api/users?created_at=2019-01-01&created_at_condition<=\n http://localhost/api/users?created_at=2019-01-01T10:11:12&created_at_condition>=\n http://localhost/api/users?updated_at=2019-02-02&updated_at_condition>=\n http://localhost/api/users?updated_at=2019-02-02T:14:22:18&updated_at_condition>=\n\n Gross fields are available only if the enhanced discounts setting is enabled\n Discount fields are available only if the enhanced discounts setting is enabled\n","responses":{"200":{"description":"get list by ids","schema":{"type":"array","items":{"$ref":"#/definitions/user_response"}}},"422":{"description":"when updated_at is required","schema":{"$ref":"#/definitions/errors_object"}}}}},"/api/users/{id}":{"get":{"summary":"Get a single user","tags":["Users"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"}],"security":[{"Bearer":{}}],"description":" Example of Request\n\n http://localhost/api/users/1\n\n","responses":{"200":{"description":"get item","schema":{"$ref":"#/definitions/user_response"}},"422":{"description":"when item not found","schema":{"$ref":"#/definitions/errors_object"}}}},"put":{"summary":"Update a single User","tags":["Users"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","type":"integer","required":true},{"name":"Authorization","in":"header","type":"string"},{"name":"Accept","in":"header","type":"string","default":"application/vnd.boostr.public"},{"name":"params","in":"body","schema":{"type":"object","properties":{"user":{"type":"object","properties":{"first_name":{"type":"string","description":"First Name of User"},"last_name":{"type":"string","description":"Last Name of User"},"win_rate":{"type":"string","description":"Deal Win Rate of the User"},"email":{"type":"string","description":"Email address of the User"},"title":{"type":"string","description":"Title of the User"},"average_deal_size":{"type":"string","description":"Average Deal size of User"},"type":{"type":"string","description":"Type of User"},"employee_id":{"type":"string","description":"Employee ID","x-nullable":true},"is_active":{"type":"boolean","description":"True if user is active"}},"required":["first_name","last_name","email"]}}}}],"security":[{"Bearer":{}}],"description":" Headers\n\n Accept: application/vnd.boostr.public\n\n Example of Request\n {\n \"user\": {\n \"first_name\": \"First Name\",\n \"last_name\": \"Last Name\",\n \"email\": \"email@email.com\",\n \"win_rate\": 100,\n \"title\": \"some title\",\n \"average_deal_size\": 3,\n \"type\": \"Default\",\n \"employee_id\": \"ID56\",\n \"is_active\": true\n }\n }\n","responses":{"200":{"description":"when valid attributes","schema":{"$ref":"#/definitions/user_response"}},"422":{"description":"when type is invalid","schema":{"$ref":"#/definitions/errors_object"}}}}}},"securityDefinitions":{"Bearer":{"type":"apiKey","description":"Bearer token","name":"Authorization","in":"header"}},"definitions":{"errors_object":{"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"decorated_field":{"type":"object","properties":{"field_name":{"type":"string"},"field_label":{"type":"string"}}},"agreement_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for Agreement"},"name":{"type":"string","description":"Name of Agreement"},"start_date":{"type":"string","format":"date","description":"Start Date of the Agreement"},"end_date":{"type":"string","format":"date","description":"End Date of the Agreement"},"status":{"type":"string","description":"Status of the Agreement","x-nullable":true},"type":{"type":"string","description":"Type of the Agreement","x-nullable":true},"auto_track":{"type":"boolean","description":""},"target":{"type":"integer","description":"Total budget of the Agreement"},"budget_fulfilled":{"type":"string","description":"Total budget of all closed won Deals attached to the Agreement"},"budget_remaining":{"type":"number","description":"target - budget_fulfilled"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"agency_holding":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"deals":{"x-nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"name":{"type":"string"},"budget":{"type":"string"},"advertiser":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"agency":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"stage":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"custom_fields":{"type":"object","x-nullable":true},"advertisers":{"type":"array","description":"Array of Advertiser Names","x-nullable":true,"items":{"type":"string"}},"agencies":{"type":"array","description":"Array of Agency Names","x-nullable":true,"items":{"type":"string"}},"parent_companies":{"type":"array","description":"Array of Parent Company Names","x-nullable":true,"items":{"type":"string"}},"team":{"x-nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"role":{"type":"string"}}}}}}},"io_line_item_response":{"type":"object","properties":{"id":{"type":"integer"},"available_units":{"type":"integer","x-nullable":true},"line_name":{"type":"string"},"io_id":{"type":"integer"},"package_id":{"type":"integer","x-nullable":true},"package_name":{"type":"string","x-nullable":true},"io_name":{"type":"string"},"io_quantity_booked":{"type":"integer","x-nullable":true},"io_ecpm":{"type":"string","x-nullable":true},"rate_card":{"type":"string","x-nullable":true},"product_name":{"type":"string"},"product_id":{"type":"number"},"rate_type":{"type":"string","x-nullable":true},"rate_type_id":{"type":"integer","x-nullable":true},"line_start_date":{"type":"string"},"line_end_date":{"type":"string"},"line_actual_cost_loc":{"type":"number","x-nullable":true},"line_estimated_cost_loc":{"type":"number","x-nullable":true},"cost_adjustment":{"type":"number","x-nullable":true},"rate_booked_loc":{"type":"number"},"rate_booked":{"type":"number"},"quantity_type":{"type":"string","x-nullable":true},"is_added_value":{"type":"boolean","x-nullable":true},"line_quantity_booked":{"type":"number","x-nullable":true},"line_quantity_delivered":{"type":"number","x-nullable":true},"line_budget_booked_loc":{"type":"number","x-nullable":true},"line_budget_booked":{"type":"number","x-nullable":true},"gross_billable_budget":{"type":"string","x-nullable":true},"gross_billable_budget_loc":{"type":"string","x-nullable":true},"line_gross_budget_booked_loc":{"type":"string","x-nullable":true},"line_gross_budget_booked":{"type":"string","x-nullable":true},"line_gross_rate_loc":{"type":"string","x-nullable":true},"line_gross_rate":{"type":"string","x-nullable":true},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"billing_cap_override":{"type":"boolean"},"billing_source":{"type":"string"},"territory":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"monthly_budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"actual_cost_loc":{"type":"string","x-nullable":true},"estimated_cost_loc":{"type":"string","x-nullable":true},"month":{"type":"string","description":"use format YYYY-MM"},"budget_booked":{"type":"string"},"budget_booked_loc":{"type":"string"},"quantity_delivered":{"type":"string","x-nullable":true},"budget_delivered":{"type":"string","x-nullable":true},"billable_quantity":{"type":"string","x-nullable":true},"billable_budget_loc":{"type":"string","x-nullable":true},"billable_budget":{"type":"string","x-nullable":true},"3p_quantity_delivered":{"type":"string","x-nullable":true},"3p_budget_delivered":{"type":"string","x-nullable":true},"3p_budget_loc_delivered":{"type":"string","x-nullable":true},"budget_delivered_loc":{"type":"string","x-nullable":true},"forecast_budget":{"type":"string","x-nullable":true},"forecast_budget_loc":{"type":"string","x-nullable":true},"quantity_booked":{"type":"string","x-nullable":true},"enable_billing_override":{"type":"boolean"},"gross_billable_budget":{"type":"string","x-nullable":true},"gross_billable_budget_loc":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"name":{"type":"string","x-nullable":true},"discount_amount":{"type":"string","x-nullable":true},"percentage":{"type":"string","x-nullable":true}}}},"uncapped_billable_quantity":{"type":"string","x-nullable":true}}}},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"name":{"type":"string","x-nullable":true},"percentage":{"type":"string","x-nullable":true}}}}}},"io_line_item_custom_field_response":{"type":"object","properties":{"id":{"type":"integer"},"available_units":{"type":"integer","x-nullable":true},"line_name":{"type":"string"},"io_id":{"type":"integer"},"package_id":{"type":"integer","x-nullable":true},"package_name":{"type":"string","x-nullable":true},"io_name":{"type":"string"},"io_quantity_booked":{"type":"integer","x-nullable":true},"io_ecpm":{"type":"string","x-nullable":true},"rate_card":{"type":"string","x-nullable":true},"product_name":{"type":"string"},"product_id":{"type":"number"},"rate_type":{"type":"string","x-nullable":true},"rate_type_id":{"type":"integer","x-nullable":true},"line_start_date":{"type":"string"},"line_end_date":{"type":"string"},"line_actual_cost_loc":{"type":"number","x-nullable":true},"line_estimated_cost_loc":{"type":"number","x-nullable":true},"cost_adjustment":{"type":"number","x-nullable":true},"rate_booked_loc":{"type":"number"},"rate_booked":{"type":"number"},"quantity_type":{"type":"string","x-nullable":true},"is_added_value":{"type":"boolean","x-nullable":true},"line_quantity_booked":{"type":"number","x-nullable":true},"line_quantity_delivered":{"type":"number","x-nullable":true},"line_budget_booked_loc":{"type":"number","x-nullable":true},"line_budget_booked":{"type":"number","x-nullable":true},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"billing_cap_override":{"type":"boolean"},"billing_source":{"type":"string"},"territory":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"monthly_budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"actual_cost_loc":{"type":"string","x-nullable":true},"estimated_cost_loc":{"type":"string","x-nullable":true},"month":{"type":"string","description":"use format YYYY-MM"},"budget_booked":{"type":"string"},"budget_booked_loc":{"type":"string"},"quantity_delivered":{"type":"string","x-nullable":true},"budget_delivered":{"type":"string","x-nullable":true},"billable_quantity":{"type":"string","x-nullable":true},"billable_budget_loc":{"type":"string","x-nullable":true},"billable_budget":{"type":"string","x-nullable":true},"3p_quantity_delivered":{"type":"string","x-nullable":true},"3p_budget_delivered":{"type":"string","x-nullable":true},"3p_budget_loc_delivered":{"type":"string","x-nullable":true},"budget_delivered_loc":{"type":"string","x-nullable":true},"forecast_budget":{"type":"string","x-nullable":true},"forecast_budget_loc":{"type":"string","x-nullable":true},"quantity_booked":{"type":"string","x-nullable":true},"enable_billing_override":{"type":"boolean"}}}},"custom_fields":{"type":"object","x-nullable":true}}},"inventory_available_periods_response":{"type":"object","properties":{"id":{"type":"integer"},"start_date":{"type":"string","format":"datetime"},"end_date":{"type":"string","format":"datetime"},"total_available_quantity":{"type":"integer"},"unsold_quantity":{"type":"integer"},"attributes":{"type":"array"},"max_quantity_per_deal":{"type":"integer","x-nullable":true},"category":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"distributed_booking":{"type":"boolean"}}},"inventory_attribute_categories_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"active":{"type":"boolean"}}},"inventory_item_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"active":{"type":"boolean"},"color":{"type":"string"},"time_period_increment":{"type":"string"},"time_period_schedule_type":{"type":"string"},"attribute_category":{"x-nullable":true,"type":"array","items":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}},"inventory_items_response":{"create_response":{"type":"array","x-nullable":true,"items":{"$ref":"#/definitions/inventory_item_response"}},"create_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"update_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object"}}}},"create_with_error_response":{"type":"array","items":{"anyOf":[{"$ref":"#/definitions/inventory_item_response"},{"$ref":"#/definitions/inventory_items/create_errors_response"}]}}},"inventory_attribute_categories":{"create_response":{"type":"array","x-nullable":true,"items":{"$ref":"#/definitions/inventory_attribute_categories_response"}},"create_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"create_with_error_response":{"type":"array","items":{"anyOf":[{"$ref":"#/definitions/inventory_attribute_categories_response"},{"$ref":"#/definitions/inventory_attribute_categories/create_with_error_response"}]}}},"inventory_attributes_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"active":{"type":"boolean"},"category":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"inventory_attributes":{"create_response":{"type":"array","x-nullable":true,"items":{"$ref":"#/definitions/inventory_attributes_response"}},"create_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"create_with_error_response":{"type":"array","items":{"anyOf":[{"$ref":"#/definitions/inventory_attributes_response"},{"$ref":"#/definitions/inventory_attributes/create_with_error_response"}]}}},"inventory_attribute_items_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"start_date":{"type":"string","format":"datetime"},"end_date":{"type":"string","format":"datetime"},"active":{"type":"boolean"},"color":{"type":"string"},"time_period_increment":{"type":"string"},"time_period_schedule_type":{"type":"string"},"attribute_category":{"x-nullable":true,"type":"array","items":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}},"inventory_available_periods":{"create_response":{"type":"array","x-nullable":true,"items":{"$ref":"#/definitions/inventory_available_period_response"}},"create_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"update_errors_response":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object"}}}},"create_with_error_response":{"type":"array","items":{"anyOf":[{"$ref":"#/definitions/inventory_available_period_response"},{"$ref":"#/definitions/inventory_available_periods/create_errors_response"}]}}},"inventory_available_period_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","x-nullable":true},"active":{"type":"boolean"},"category":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"activity_response":{"type":"object","properties":{"id":{"type":"integer"},"user_name":{"type":"string"},"agency":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"advertiser":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"deal":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"lead":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"publisher":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"activity_type_name":{"type":"string"},"happened_at":{"type":"string","x-nullable":true,"format":"date-time"},"created_by":{"type":"string"},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"custom_fields":{"type":"object","x-nullable":true},"client":{"type":"object","x-nullable":true,"properties":{"advertisers":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}},"agencies":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}},"contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"required":["id","user_name","activity_type_name"]},"accounts_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"website":{"type":"string","x-nullable":true},"type":{"type":"array","items":{"type":"string"}},"category":{"type":"string","x-nullable":true},"sub_category":{"type":"string","x-nullable":true},"parent_account":{"type":"string","x-nullable":true},"parent_account_id":{"type":"integer","x-nullable":true},"region":{"type":"string","x-nullable":true},"segment":{"type":"string","x-nullable":true},"holding_company":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"shell_record":{"type":"boolean","x-nullable":true},"note":{"type":"string","x-nullable":true},"locked":{"type":"boolean","x-nullable":true},"legacy_id":{"type":"string","x-nullable":true},"discount":{"type":"string","x-nullable":true},"team":{"type":"array","x-nullable":true,"properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","x-nullable":true},"share":{"type":"integer"},"type":{"type":"string"}}},"client_contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"contact_id":{"type":"integer"},"is_active":{"type":"boolean"},"primary":{"type":"boolean"}}}},"address":{"type":"object","x-nullable":true,"email":{"type":"string"},"street1":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true},"zip":{"type":"string","x-nullable":true},"country":{"type":"string","x-nullable":true},"phone":{"type":"string","x-nullable":true},"mobile":{"type":"string","x-nullable":true}},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true}},"required":["id"]},"account_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"website":{"type":"string","x-nullable":true},"type":{"type":"array","items":{"type":"string"}},"category":{"type":"string","x-nullable":true},"sub_category":{"type":"string","x-nullable":true},"parent_account":{"type":"string","x-nullable":true},"parent_account_id":{"type":"integer","x-nullable":true},"region":{"type":"string","x-nullable":true},"segment":{"type":"string","x-nullable":true},"holding_company":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"shell_record":{"type":"boolean","x-nullable":true},"note":{"type":"string","x-nullable":true},"locked":{"type":"boolean","x-nullable":true},"legacy_id":{"type":"string","x-nullable":true},"discount":{"type":"string","x-nullable":true},"team":{"type":"array","x-nullable":true,"properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","x-nullable":true},"share":{"type":"integer"},"type":{"type":"string"}}},"client_contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"contact_id":{"type":"integer"},"is_active":{"type":"boolean"},"primary":{"type":"boolean"}}}},"client_connections":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"client_id":{"type":"integer"},"active":{"type":"boolean"},"primary":{"type":"boolean"}}}},"address":{"type":"object","x-nullable":true,"email":{"type":"string"},"street1":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true},"zip":{"type":"string","x-nullable":true},"country":{"type":"string","x-nullable":true},"phone":{"type":"string","x-nullable":true},"mobile":{"type":"string","x-nullable":true}},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true}},"required":["id"]},"merge_account_response":{"type":"object","properties":{"account_transaction_id":{"type":"integer"}}},"contact_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"middle_name":{"type":"string","x-nullable":true},"title":{"type":"string","x-nullable":true},"position":{"type":"string","x-nullable":true},"works_at":{"type":"string","x-nullable":true},"contact_type":{"type":"string","x-nullable":true},"created_by":{"type":"string"},"updated_by":{"type":"string","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"address":{"type":"object","x-nullable":true,"email":{"type":"string"},"street1":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true},"zip":{"type":"string","x-nullable":true},"country":{"type":"string","x-nullable":true},"phone":{"type":"string","x-nullable":true},"mobile":{"type":"string","x-nullable":true}},"account_contacts":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"account_id":{"type":"integer"},"is_active":{"type":"boolean"},"account":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}}},"required":["id"]},"contract_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for Contract"},"name":{"type":"string","description":"Name of Contract"},"restricted":{"type":"boolean"},"start_date":{"type":"string","format":"date","x-nullable":true,"description":"Start date of the Contract"},"end_date":{"type":"string","format":"date","x-nullable":true,"description":"End Date of the Contract"},"signed_date":{"type":"string","format":"date","x-nullable":true,"description":"Date of Signature"},"status":{"type":"string","x-nullable":true,"description":"Status of the Contract"},"type":{"type":"string","description":"Status of the Contract"},"auto_renew":{"type":"boolean"},"currency":{"type":"string","x-nullable":true,"description":"ISC Currency Code"},"created_by":{"type":"string"},"created_at":{"type":"string","description":"Timestamp of creation"},"updated_at":{"type":"string","x-nullable":true,"description":"Timestamp of update"},"custom_fields":{"type":"object","x-nullable":true},"deal":{"x-nullable":true,"type":"object","description":"Deal of Contract","properties":{"id":{"type":"integer"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"name":{"type":"string"},"budget":{"type":"string"},"advertiser":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"agency":{"x-nullable":true,"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"contacts":{"description":"Contacts of Contract","type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"middle_name":{"type":"string","x-nullable":true},"title":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"works_at":{"type":"string","x-nullable":true},"address":{"type":"object","x-nullable":true,"email":{"type":"string"},"street1":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"x-nullable":true},"zip":{"type":"string","x-nullable":true},"country":{"type":"string","x-nullable":true},"phone":{"type":"string","x-nullable":true},"mobile":{"type":"string","x-nullable":true}}}}},"team":{"description":"Team Members of Contract","type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true}}}},"advertiser":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the advertiser in Boostr"},"name":{"type":"string","description":"Name of the advertiser in Boostr"}}},"agency":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the agency in Boostr"},"name":{"type":"string","description":"Name of the agency in Boostr"}}}},"agency_holding":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"required":["id"]},"content_fee_response":{"type":"object","properties":{"id":{"type":"integer"},"io_id":{"type":"integer"},"io_name":{"type":"string"},"product_name":{"type":"string"},"product_id":{"type":"integer"},"updated_at":{"type":"string"},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"budget_loc":{"type":"string","x-nullable":true},"budget":{"type":"string","x-nullable":true},"month_budget_delivered_loc":{"type":"array","items":{"type":"object"}},"month_budget_delivered":{"type":"array","items":{"type":"object"}},"custom_fields":{"type":"object","x-nullable":true},"product_budgets":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"budget_loc":{"type":"number"},"budget":{"type":"number"}}}}},"required":["id"]},"media_plans_response":{"type":"object","properties":{"id":{"type":"integer"},"deal_id":{"type":"integer"},"deal_name":{"type":"string"},"owner_id":{"type":"integer"},"name":{"type":"string"},"budget":{"type":"string","x-nullable":true},"budget_loc":{"type":"string","x-nullable":true},"budget_goal":{"type":"string","x-nullable":true},"budget_goal_loc":{"type":"string","x-nullable":true},"media_plan_quantity":{"type":"integer","x-nullable":true},"media_plan_ecpm":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"margin":{"type":"integer","x-nullable":true},"status":{"type":"string","x-nullable":true},"is_primary":{"type":"boolean","x-nullable":true},"is_current":{"type":"boolean","x-nullable":true},"is_locked":{"type":"boolean","x-nullable":true},"rate_card_id":{"type":"integer"},"rate_card_name":{"type":"string"},"cost":{"type":"string","x-nullable":true},"cost_loc":{"type":"string","x-nullable":true},"gam_proposal_id":{"type":"integer","x-nullable":true},"gross_budget":{"type":"number","x-nullable":true},"gross_budget_loc":{"type":"number","x-nullable":true},"created_by":{"type":"integer","x-nullable":true},"updated_by":{"type":"integer","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"name":{"type":"string","x-nullable":true},"percentage":{"type":"string","x-nullable":true}}}}},"required":["id"]},"custom_deal_product_response":{"type":"object","properties":{"id":{"type":"integer"},"deal_id":{"type":"integer"},"budget":{"type":"number","x-nullable":true},"budget_loc":{"type":"number","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"term":{"type":"string","x-nullable":true},"period":{"type":"string","x-nullable":true},"product":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"full_name":{"type":"string"},"level":{"type":"integer"},"parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"level":{"type":"integer"}}},"top_parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"level":{"type":"integer"}}}}},"show_in_forecast":{"type":"boolean"},"territory":{"type":"object","x-nullable":true,"description":"","properties":{"id":{"type":"integer","description":"ID of the Territory"},"name":{"type":"string","description":"Name of the Territory"}}},"deal_product_budgets":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"budget_loc":{"type":"number"},"budget":{"type":"number"}}}}},"required":["id"]},"deal_product_response":{"type":"object","properties":{"id":{"type":"integer"},"deal_id":{"type":"integer"},"budget":{"type":"number","x-nullable":true},"budget_loc":{"type":"number","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"term":{"type":"string","x-nullable":true},"period":{"type":"string","x-nullable":true},"product":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"full_name":{"type":"string"},"level":{"type":"integer"},"parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"level":{"type":"integer"}}},"top_parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"level":{"type":"integer"}}}}},"show_in_forecast":{"type":"boolean"},"territory":{"type":"object","x-nullable":true,"description":"","properties":{"id":{"type":"integer","description":"ID of the Territory"},"name":{"type":"string","description":"Name of the Territory"}}},"monthly_budgets":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"budget_loc":{"type":"number"},"budget":{"type":"number"}}}}},"required":["id"]},"display_line_item_response":{"type":"object","properties":{"id":{"type":"integer"},"line_number":{"type":"number"},"ad_server":{"type":"string"},"price":{"type":"number"},"pricing_type":{"type":"string","x-nullable":true},"start_date":{"type":"string"},"end_date":{"type":"string"},"line_quantity":{"type":"number"},"line_quantity_delivered":{"type":"number"},"line_budget_loc":{"type":"number"},"line_budget":{"type":"number"},"line_budget_delivered_loc":{"type":"number"},"line_budget_delivered":{"type":"number"},"is_pg":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string","x-nullable":true},"io":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"product":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"monthly_budgets":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"budget_delivered":{"type":"number"},"budget_delivered_loc":{"type":"number"},"quantity_delivered":{"type":"number"}}}}},"required":["id","io"]},"deal_response":{"type":"object","properties":{"id":{"type":"integer"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"name":{"type":"string"},"type":{"type":"string","x-nullable":true},"source":{"type":"string","x-nullable":true},"next_steps":{"type":"string","x-nullable":true},"stage_name":{"type":"string","x-nullable":true},"stage_id":{"type":"integer","x-nullable":true},"deal_type":{"type":"string","x-nullable":true},"advertiser_id":{"type":"integer","x-nullable":true},"advertiser_name":{"type":"string","x-nullable":true},"agency_id":{"type":"integer","x-nullable":true},"agency_name":{"type":"string","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"currency_code":{"type":"string"},"budget":{"type":"string"},"budget_loc":{"type":"string"},"lead_id":{"type":"integer","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"closed_at":{"type":"string","format":"date","x-nullable":true},"closed_comments":{"type":"string","x-nullable":true},"closed_reason":{"type":"string","x-nullable":true},"deal_members":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"user_id":{"type":"integer","x-nullable":true},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"type":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true}}}},"deal_contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"middle_name":{"type":"string","x-nullable":true},"title":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true},"phone":{"type":"string","x-nullable":true},"mobile":{"type":"string","x-nullable":true},"works_at":{"type":"string","x-nullable":true},"position":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true}}}},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":"integer","x-nullable":true},"external_type":{"type":"string","x-nullable":true}}}}},"required":["id"]},"lead_response":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"status":{"type":"string","x-nullable":true},"state":{"type":"string","x-nullable":true},"account":{"type":"string","x-nullable":true},"contact":{"type":"string","x-nullable":true},"company_name":{"type":"string","x-nullable":true},"budget":{"type":"string","x-nullable":true},"notes":{"type":"string","x-nullable":true},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"title":{"type":"string","x-nullable":true},"created_at":{"type":"string","x-nullable":true},"updated_at":{"type":"string","x-nullable":true},"rejected_at":{"type":"string","x-nullable":true},"rejected_reason":{"type":"string","x-nullable":true},"rejected_reason_dropdown":{"type":"string","x-nullable":true},"accepted_at":{"type":"string","x-nullable":true},"reassigned_at":{"type":"string","x-nullable":true},"country":{"type":"string","x-nullable":true},"product_name":{"type":"string","x-nullable":true},"phone_number":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"source":{"type":"object","x-nullable":true,"properties":{"name":{"type":"string"},"info":{"type":"string","x-nullable":true},"url":{"type":"string","x-nullable":true}}},"deals":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}},"user":{"type":"object","propetries":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"integer","x-nullable":true}}}},"required":["id"]},"media_plan_line_item_response":{"type":"object","properties":{"id":{"type":"integer"},"available_units":{"type":"integer","x-nullable":true},"name":{"type":"string"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"budget":{"type":"string"},"budget_loc":{"type":"string"},"rate":{"type":"string","x-nullable":true},"rate_loc":{"type":"string","x-nullable":true},"quantity":{"type":"number","x-nullable":true},"gross_budget_loc":{"type":"string"},"gross_rate_loc":{"type":"string"},"media_plan_quantity":{"type":"integer","x-nullable":true},"media_plan_ecpm":{"type":"string","x-nullable":true},"is_added_value":{"type":"boolean","x-nullable":true},"est_cost":{"type":"string","x-nullable":true},"est_cost_loc":{"type":"string","x-nullable":true},"margin":{"type":"integer"},"cost_adjustment":{"type":"string","x-nullable":true},"gam_deal_type":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"quantity_type":{"type":"string","x-nullable":true},"line_item_monthlies":{"x-nullable":true,"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"use format YYYY-MM"},"quantity":{"type":"string"},"budget_loc":{"type":"string"},"budget":{"type":"string"},"est_cost_loc":{"type":"string"},"est_cost":{"type":"string"}}}},"deal_product":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"}}},"media_plan":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"}}},"package":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"product":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"rate_cart":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"rate_type":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"territory":{"type":"object","x-nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string"}}},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true},"name":{"type":"string","x-nullable":true},"percentage":{"type":"string","x-nullable":true}}}}},"required":["id"]},"io_response":{"type":"object","properties":{"id":{"type":"integer"},"rate_card_id":{"type":"integer","x-nullable":true},"external_io_number":{"type":"integer","x-nullable":true},"pg_id":{"type":"integer","x-nullable":true},"io_number":{"type":"integer","x-nullable":true},"io_quantity_booked":{"type":"integer","x-nullable":true},"io_ecpm":{"type":"string","x-nullable":true},"deal_id":{"type":"integer","x-nullable":true},"advertiser":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"agency":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"status":{"type":"string","x-nullable":true},"calendar_type":{"type":"string","x-nullable":true},"budget_loc":{"type":"string","x-nullable":true},"budget":{"type":"string","x-nullable":true},"budget_booked_loc":{"type":"string","x-nullable":true},"budget_booked":{"type":"string","x-nullable":true},"currency":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"discount":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"gross_budget":{"type":"number","x-nullable":true},"gross_budget_loc":{"type":"number","x-nullable":true},"io_members":{"type":"array","x-nullable":true,"items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"from_date":{"type":"string","x-nullable":true},"to_date":{"type":"string","x-nullable":true},"product_id":{"type":"integer","x-nullable":true},"seller_type":{"type":"string","x-nullable":true},"name":{"type":"string","x-nullable":true},"role":{"type":"string","x-nullable":true}}}},"discounts":{"type":"array","x-nullable":true,"items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","x-nullable":true},"name":{"type":"string","x-nullable":true},"percentage":{"type":"string","x-nullable":true}}}}},"required":["id"]},"pmp_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"deal_id":{"type":"integer","x-nullable":true},"advertiser_id":{"type":"integer"},"advertiser_name":{"type":"string"},"agency_id":{"type":"integer","x-nullable":true},"agency_name":{"type":"string","x-nullable":true},"lead_id":{"type":"integer","x-nullable":true},"budget":{"type":"string","x-nullable":true},"budget_net":{"type":"string","x-nullable":true},"budget_loc":{"type":"string","x-nullable":true},"budget_net_loc":{"type":"string","x-nullable":true},"budget_delivered":{"type":"string","x-nullable":true},"budget_delivered_net":{"type":"string","x-nullable":true},"budget_delivered_loc":{"type":"string","x-nullable":true},"budget_delivered_net_loc":{"type":"string","x-nullable":true},"budget_remaining":{"type":"string","x-nullable":true},"budget_remaining_net":{"type":"string","x-nullable":true},"budget_remaining_loc":{"type":"string","x-nullable":true},"budget_remaining_net_loc":{"type":"string","x-nullable":true},"currency":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"updated_at":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":"integer","x-nullable":true},"external_type":{"type":"string","x-nullable":true}}}},"pmp_members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string","x-nullable":true},"share":{"type":"integer","x-nullable":true},"from_date":{"type":"string","x-nullable":true},"to_date":{"type":"string","x-nullable":true}}}}},"required":["id"]},"pmp_item_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for a PMP Item"},"ssp_deal_id":{"type":"string","description":"Deal ID from the SSP"},"pmp_type":{"type":"string","x-nullable":true,"description":"Type of the PMP"},"budget":{"type":"number","description":"Budget for the PMP Item"},"budget_loc":{"type":"string","description":"Gross budget of the PMP in local currency"},"budget_delivered":{"type":"string","description":"Gross budget delivered of the PMP in USD"},"budget_delivered_loc":{"type":"string","description":"Gross budget delivered of the PMP in local currency"},"budget_remaining":{"type":"string","description":"Gross budget remaining of the PMP in USD"},"budget_remaining_loc":{"type":"string","description":"Gross budget remaining of the PMP in local currency"},"budget_net_delivered":{"type":"string","description":"Net budget delivered of the PMP in USD"},"budget_net_delivered_loc":{"type":"string","description":"Net budget delivered of the PMP in local currency"},"budget_net_remaining":{"type":"string","description":"Net budget remaining of the PMP in USD"},"budget_net_remaining_loc":{"type":"string","description":"Net budget remaining of the PMP in local currency"},"custom_field":{"type":"object","x-nullable":true,"description":"Custom Fields in object format: Key = custom field name, Value = custom field value"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"ssp":{"type":"object","x-nullable":true,"description":"","properties":{"id":{"type":"integer","description":"ID of the SSP"},"name":{"type":"string","description":"Name of the SSP"}}},"product":{"type":"object","x-nullable":true,"description":"","properties":{"id":{"type":"integer","description":"ID of the Product"},"name":{"type":"string","description":"Full name of the Product"}}},"territory":{"type":"object","x-nullable":true,"description":"","properties":{"id":{"type":"integer","description":"ID of the Territory"},"name":{"type":"string","description":"Name of the Territory"}}}}},"pmp_item_daily_actual_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for a PMP Item Daily Actual"},"date":{"type":"string","format":"date"},"ad_unit":{"type":"string","x-nullable":true,"description":"Ad Unit for the PMP Daily Actual"},"ad_requests":{"type":"integer"},"cpm":{"type":"string","description":"eCPM in local currency"},"cpm_net":{"type":"string","x-nullable":true,"description":"Net eCPM in local currency"},"ssp_advertiser":{"type":"string","x-nullable":true,"description":"Name of the advertiser from the SSP"},"impressions":{"type":"integer","description":"Impressions from the daily actual"},"win_rate":{"type":"string","x-nullable":true,"description":"Win rate of the daily actual"},"revenue":{"type":"string","x-nullable":true,"description":"Gross revenue of the daily actual in USD"},"revenue_loc":{"type":"string","x-nullable":true,"description":"Gross revenue of the daily actual in local currency"},"revenue_net":{"type":"string","x-nullable":true,"description":"Net revenue of the daily actual in USD"},"revenue_net_loc":{"type":"string","x-nullable":true,"description":"Net revenue of the daily actual in local currency"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":"string","x-nullable":true},"updated_by":{"type":"string","x-nullable":true},"advertiser":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the advertiser in Boostr (can be null)"},"name":{"type":"string","description":"Name of the advertiser in Boostr (can be null)"}}}}},"product_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"full_name":{"type":"string"},"parent_id":{"type":"integer","x-nullable":true},"top_parent_id":{"type":"integer","x-nullable":true},"active":{"type":"boolean"},"pg_enabled":{"type":"boolean","x-nullable":true},"rate_type_id":{"type":"integer","x-nullable":true},"level":{"type":"integer"},"revenue_type":{"type":"string","x-nullable":true},"margin":{"type":"integer","x-nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"product_type":{"type":"string","x-nullable":true},"audience_extension_enabled":{"type":"boolean","x-nullable":true},"product_family":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"custom_field":{"type":"object","x-nullable":true}},"required":["id"]},"quota_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID of the quota"},"user":{"type":"object","description":"User of the quota","properties":{"id":{"type":"integer","description":"ID of the user"},"email":{"type":"string","description":"Email of the user"},"first_name":{"type":"string","description":"First Name of the user"},"last_name":{"type":"string","description":"Last Name of then user"}}},"type":{"type":"string","description":"Type of the quota","x-nullable":true},"product":{"type":"string","description":"Product name of the quota","x-nullable":true},"product_family":{"type":"string","description":"Family product name of the quota","x-nullable":true},"time_period":{"type":"string","description":"Time period of the quota","x-nullable":true},"quote":{"type":"string","description":"Value of the quota","x-nullable":true},"currency":{"type":"string","description":"ISO Code of the quota","x-nullable":true}},"required":["id"]},"rate_card_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID of the rate card"},"name":{"type":"string","description":"Name of the rate card"},"active":{"type":"boolean","description":"Boolean for Active status of rate card"},"description":{"type":"string","description":"Description of the rate card"},"currency":{"type":"string","description":"ISO Code of the rate card currency"},"default":{"type":"boolean","description":"Boolean for rate card default status"},"products_count":{"type":"integer","description":"Count of products on rate card"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":"string","x-nullable":true,"description":"Email of rate card creator"},"updated_by":{"type":"string","x-nullable":true,"description":"Email of last user to update rate card"}},"required":["id"]},"stage_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"probablity":{"type":"integer"},"deals":{"type":"integer"},"active":{"type":"boolean"},"open":{"type":"boolean"}},"required":["id"]},"team_response":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"Unique ID for a team"},"name":{"type":"string","description":"Name of the Team"},"team_type":{"type":"string","description":"Type of the Team"},"members_count":{"type":"integer","description":"Count of Team Members"},"members":{"type":"array","items":[{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the member"},"email":{"type":"string","description":"Email of the member"},"first_name":{"type":"string","description":"First Name of the member"},"last_name":{"type":"string","description":"Last Name of the member"}}}]},"top_parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the top Parent Team"},"name":{"type":"string","description":"Name of the top Parent Team"}}},"parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the Parent Team"},"name":{"type":"string","description":"Name of the Parent Team"}}},"leader":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the Team Leader"},"email":{"type":"string","description":"Email of the Team Leader"}}},"products":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}},"rate_cards":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"description":"Available for OMS companies only"},"sales_processes":{"type":"array","x-nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"default":{"type":"boolean"}}}}}},"simple_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"user_response":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for a user"},"first_name":{"type":"string","description":"First Name of User"},"last_name":{"type":"string","description":"Last Name of User"},"email":{"type":"string","description":"Email address of the User"},"title":{"type":"string","x-nullable":true,"description":"Title of the User"},"win_rate":{"type":"string","x-nullable":true,"description":"Deal Win Rate of the User"},"average_deal_size":{"type":"string","x-nullable":true,"description":"Average Deal size of User"},"type":{"type":"string","description":"Type of User"},"is_active":{"type":"boolean","description":"True if user is active"},"employee_id":{"type":"string","description":"Employee ID","x-nullable":true},"team":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"Unique ID for a team"},"name":{"type":"string","description":"Name of the Team"},"members_count":{"type":"integer","description":"Count of Team Members"},"top_parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the top Parent Team"},"name":{"type":"string","description":"Name of the top Parent Team"}}},"parent":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the Parent Team"},"name":{"type":"string","description":"Name of the Parent Team"}}},"leader":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer","description":"ID of the Team Leader"},"email":{"type":"string","description":"Email of the Team Leader"}}}}}},"required":["id","first_name","last_name","email"]},"user_token_response":{"type":"object","properties":{"jwt":{"type":"string"}},"required":["jwt"]},"itemized_cost_response":{"type":"object","properties":{"id":{"type":"integer"},"description":{"type":"string","x-nullable":true},"actual_cost_loc":{"type":"number","x-nullable":true},"actual_cost":{"type":"number","x-nullable":true},"cost_type":{"type":"string","x-nullable":true},"monthlies":{"type":"array","items":{"type":"object","properties":{"actual_cost_loc":{"type":"number"},"actual_cost":{"type":"number"},"month":{"type":"string","description":"use format YYYY-MM"}}}}}},"traffic_line_items_response":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","x-nullable":true},"traffic_order_id":{"type":"number","x-nullable":true},"io_id":{"type":"number","x-nullable":true},"io_line_item_id":{"type":"number","x-nullable":true},"rate_type":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"curr_cd":{"type":"string","x-nullable":true},"rate":{"type":"string","x-nullable":true},"rate_loc":{"type":"string","x-nullable":true},"budget_loc":{"type":"string","x-nullable":true},"budget":{"type":"string","x-nullable":true},"quantity":{"type":"number","x-nullable":true},"buffer":{"type":"string","x-nullable":true},"buffered_quantity":{"type":"number","x-nullable":true},"buffered_rate":{"type":"string","x-nullable":true},"buferred_rate_loc":{"type":"string","x-nullable":true},"exclude_reporting":{"type":"boolean"},"integration_id":{"type":"array","items":{"type":"object","properties":{"integrations_id":{"type":"string","x-nullable":true},"external_text_id":{"type":"string","x-nullable":true},"external_id":{"type":"string","x-nullable":true},"external_type":{"type":"string","x-nullable":true}}}},"inventory_targeting":{"type":"object","properties":{"included":{"type":"array","x-nullable":true,"items":{"type":"integer"}},"excluded":{"type":"array","x-nullable":true,"items":{"type":"integer"}}}},"location_targeting":{"type":"object","properties":{"included":{"type":"array","x-nullable":true,"items":{"type":"integer"}},"excluded":{"type":"array","x-nullable":true,"items":{"type":"integer"}}}},"created_at":{"type":"string","x-nullable":true},"updated_at":{"type":"string","x-nullable":true},"ad_server_fields":{"type":"object"},"custom_fields":{"type":"object","x-nullable":true}}},"integration_response":{"type":"object","properties":{"id":{"type":"integer"},"integratable_id":{"type":"integer"},"integratable_type":{"type":"string"},"external_id":{"type":"integer","x-nullable":true},"external_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"external_text_id":{"type":"string","x-nullable":true},"company_id":{"type":"integer"}},"required":["id"]},"client_merge_transaction_response":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"},"notes":{"type":"string","x-nullable":true},"user_id":{"type":"integer","x-nullable":true},"user_email":{"type":"string","x-nullable":true},"timestamp":{"type":"string","format":"date-time"},"retained_account":{"type":"integer"},"account_type":{"type":"string"},"merged_accounts":{"type":"array","x-nullable":true,"items":{"type":"integer"}}}},"io_invoice_response":{"type":"object","properties":{"id":{"type":"integer"},"month":{"type":"string"},"pushed_to_erp":{"type":"boolean"},"io_id":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"billing_source":{"type":"string","x-nullable":true},"billing_status":{"type":"string"},"integration_status":{"type":"string","x-nullable":true,"description":"for enhanced billing only"},"rebilled":{"type":"boolean","x-nullable":true,"description":"for enhanced billing only"},"period":{"type":"string"},"date":{"type":"string"},"billing_contact_name":{"type":"string","x-nullable":true},"billing_address":{"type":"object"},"billing_account_name":{"type":"string","x-nullable":true},"io_number":{"type":"string","x-nullable":true},"client_io_number":{"type":"string","x-nullable":true},"po_number":{"type":"string","x-nullable":true},"applied_credit_total":{"type":"string","x-nullable":true,"description":"for enhanced billing only"},"applied_credit_total_loc":{"type":"string","x-nullable":true,"description":"for enhanced billing only"},"curr_cd":{"type":"string"},"billing_payment_term_id":{"type":"integer","x-nullable":true},"advertiser_id":{"type":"integer","x-nullable":true},"agency_id":{"type":"integer","x-nullable":true},"closed_at":{"type":"string","x-nullable":true},"revised":{"type":"boolean"},"pushed_at":{"type":"string","x-nullable":true},"sub_total_billable_budget_loc":{"type":"string"},"sub_total_billable_budget":{"type":"string"},"total_billable_budget":{"type":"string"},"total_billable_budget_loc":{"type":"string"},"custom_field":{"type":"object","x-nullable":true},"financial_discount_entities":{"type":"array","items":{"$ref":"#/definitions/financial_discount_entity_response"}},"line_item_monthlies":{"type":"array","items":{"$ref":"#/definitions/line_item_monthly_response"}},"io_package_monthlies":{"type":"array","items":{"$ref":"#/definitions/io_package_monthly_response"}}}},"billing_credit_response":{"type":"object","properties":{"id":{"type":"integer"},"io_invoice_id":{"type":"integer"},"description":{"type":"string","x-nullable":true},"integration_status":{"type":"string","x-nullable":true},"applied_date":{"type":"string","x-nullable":true},"billing_type":{"type":"string","x-nullable":true},"billable_budget_loc":{"type":"string","x-nullable":true},"billable_budget":{"type":"string","x-nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"type":"string","x-nullable":true},"billing_credit_reason":{"type":"string","x-nullable":true},"curr_cd":{"type":"string","x-nullable":true},"po_number":{"type":"string","x-nullable":true},"io_number":{"type":"string","x-nullable":true},"billing_contact_name":{"type":"string","x-nullable":true},"billing_address":{"type":"object","x-nullable":true},"billing_account_name":{"type":"string","x-nullable":true},"external_io_number":{"type":"string","x-nullable":true},"billing_payment_term":{"type":"string","x-nullable":true},"advertiser_id":{"type":"number","x-nullable":true},"agency_id":{"type":"number","x-nullable":true},"client_io_number":{"type":"string","x-nullable":true},"pushed_at":{"type":"string","x-nullable":true},"integration_error":{"type":"string","x-nullable":true},"rebill":{"type":"boolean","x-nullable":true},"adjusted_gross_billable_budget":{"type":"string","x-nullable":true},"adjusted_gross_billable_budget_loc":{"type":"string","x-nullable":true},"custom_fields":{"type":"object","x-nullable":true},"credit_lines":{"type":"array","x-nullable":true,"items":{"type":"object","x-nullable":true,"properties":{"id":{"type":"integer"},"description":{"type":"string","x-nullable":true},"billing_credit_id":{"type":"integer"},"io_line_item_monthly_id":{"type":"integer","x-nullable":true},"rate_type_id":{"type":"integer","x-nullable":true},"billable_budget":{"type":"string","x-nullable":true},"billable_budget_loc":{"type":"string","x-nullable":true},"rate_booked":{"type":"string","x-nullable":true},"rate_booked_loc":{"type":"string","x-nullable":true},"billable_quantity":{"type":"string","x-nullable":true},"created_at":{"type":"string","x-nullable":true},"updated_at":{"type":"string","x-nullable":true},"product_id":{"type":"string","x-nullable":true},"io_line_item_id":{"type":"integer","x-nullable":true},"io_package_id":{"type":"integer","x-nullable":true},"io_package_monthly_id":{"type":"integer","x-nullable":true},"adjusted_gross_billable_budget":{"type":"string","x-nullable":true},"adjusted_gross_billable_budget_loc":{"type":"string","x-nullable":true},"adjusted_gross_rate":{"type":"string","x-nullable":true},"adjusted_gross_rate_loc":{"type":"string","x-nullable":true}}}}}},"line_item_monthly_response":{"type":"object","properties":{"id":{"type":"integer"},"line_item_id":{"type":"integer","x-nullable":true},"start_date":{"type":"string","x-nullable":true},"end_date":{"type":"string","x-nullable":true},"quantity_booked":{"type":"string","x-nullable":true},"budget_booked":{"type":"string","x-nullable":true},"budget_booked_loc":{"type":"string","x-nullable":true},"quantity_delivered":{"type":"string","x-nullable":true},"3p_quantity_delivered":{"type":"string","x-nullable":true},"budget_delivered":{"type":"string","x-nullable":true},"budget_loc_delivered":{"type":"string","x-nullable":true},"3p_budget_delivered":{"type":"string","x-nullable":true},"3p_budget_loc_delivered":{"type":"string","x-nullable":true},"est_cost":{"type":"string","x-nullable":true},"est_cost_loc":{"type":"string","x-nullable":true},"actual_cost":{"type":"string","x-nullable":true},"actual_cost_loc":{"type":"string","x-nullable":true},"estimated_margin":{"type":"integer","x-nullable":true},"actual_margin":{"type":"string","x-nullable":true},"created_at":{"type":"string","x-nullable":true},"updated_at":{"type":"string","x-nullable":true},"billable_quantity":{"type":"string","x-nullable":true},"billable_budget_loc":{"type":"string","x-nullable":true},"billable_budget":{"type":"string","x-nullable":true},"forecast_budget_loc":{"type":"string","x-nullable":true},"forecast_budget":{"type":"string","x-nullable":true},"enable_billing_override":{"type":"boolean","x-nullable":true},"billing_status":{"type":"string","x-nullable":true},"rebilled":{"type":"boolean","x-nullable":true,"description":"used by enhanced billing"},"month_name":{"type":"string","x-nullable":true},"io_invoice_id":{"type":"integer","x-nullable":true},"mediaocean_flighting_serial_number":{"type":"string","x-nullable":true,"description":"used by mediaocean integration"},"parent_id":{"type":"integer","x-nullable":true},"io_package_monthly_id":{"type":"integer","x-nullable":true},"revised":{"type":"boolean","x-nullable":true},"gross_billable_budget_loc":{"type":"string","x-nullable":true,"description":"used by enhanced discounts"},"gross_billable_budget":{"type":"string","x-nullable":true,"description":"used by enhanced discounts"},"billing_factor":{"type":"string","x-nullable":true,"description":"optional feature set in OMS Settings"},"uncapped_billable_quantity":{"type":"string","x-nullable":true,"description":"optional feature set in OMS Settings"},"rate_at_close":{"type":"string","x-nullable":true},"gross_rate_at_close":{"type":"string","x-nullable":true},"gross_rate_at_close_loc":{"type":"string","x-nullable":true},"custom_field":{"type":"object","x-nullable":true},"financial_discount_entities":{"type":"array","items":{"$ref":"#/definitions/financial_discount_entity_response"}}}},"financial_discount_entity_response":{"type":"object","properties":{"id":{"type":"integer"},"financial_discount_id":{"type":"integer","x-nullable":true},"percentage":{"type":"string","x-nullable":true},"discount_amount":{"type":"string","x-nullable":true}}},"io_package_monthly_response":{"type":"object","properties":{"id":{"type":"integer"},"io_package_id":{"type":"integer"},"billable_quantity":{"type":"string"},"billable_budget_loc":{"type":"string"},"billable_budget":{"type":"string"},"billing_override":{"type":"boolean"},"rebilled":{"type":"boolean","description":"used by enhanced billing"},"gross_billable_budget":{"type":"string","description":"used by enhanced discounts"},"gross_billable_budget_loc":{"type":"string","description":"used by enhanced discounts"},"uncapped_billable_quantity":{"type":"string","description":"optional feature set in OMS Settings"},"rate_at_close":{"type":"string"},"gross_rate_at_close":{"type":"string"},"gross_rate_at_close_loc":{"type":"string"}}}}}