/
CL -Demand Labels API
CL -Demand Labels API
Creating a Demand Label
SDK
Use tab completion with SDK to auto-complete function names or show field options!
In [40]: label = springserve.demand_labels.new({"name": "API Docs label"}) In [41]: print label.id, label.name 1764 API Docs label
REST API
POST /api/v0/demand_labels
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ "name": "API Docs Label, } |
Required parameters: name
Response
Status code 200
{ "id": 353, "name": "API Docs label", "account_id": 1 }
Get a Demand Label
SDK
In [1]: label = springserve.demand_labels.get(1764) In [2]: print label.name "API Docs label"
REST API
GET /api/v0/demand_labels/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Response
Status code 200
{ "id": 1764, "name": "API Docs label", "account_id": 1 }
Edit a Demand Label
SDK
In [1]: label = springserve.demand_labels.get(1764) In [2]: label.name = "I want to change the name" In [3]: changed = label.save() In [4]: changed.ok Out [4]: True In [5]: print changed.name "I want to change the name"
REST API
PUT /api/v0/demand_labels/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ "name" : "I want to change the name" } |
Response
Status code 200
{ "id": 353, "name": "I want to change the name", "account_id": 1 }
, multiple selections available,
Related content
Demand Labels API
Demand Labels API
More like this
Supply Labels API
Supply Labels API
More like this
Demand Tag API
Demand Tag API
More like this
CL -Demand Tag API
CL -Demand Tag API
More like this
CL -Demand Partners API
CL -Demand Partners API
More like this
Demand Partners API
Demand Partners API
More like this