Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "id": 638465,
    "account_id": 391,
    "name": "Tag Name Docs",
    "active": true,
    "rate": "0.01",
	...
    "spotx_connect_enabled": true,
    "supply_spotx_connects": [
        {
            "spotx_connect_id": 893715
        }
    ],
	"demand_tag_priorities": [{"demand_tag_id": 880921, "priority": 1, "tier": 5, "locked": False, "ratio": None, "slot_number": None, 	"slot_order": None}]
	...
}


Changing Tier to a Supply Tag with SpotX Connect

SDK

Code Block
In [1]: import springserve

In [2]: tag = springserve.supply_tags.get(638465)

In [3]: tag.demand_tag_priorities[0]["tier"] = 3

In [4]: saved_tag = tag.save()

In [5]: print saved_tag.ok, saved_tag.demand_tag_priorities[0]["tier"])
True, 3


REST API

PATCH /api/v0/supply_tags/<id>

Headers

Code Block
Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
    "demand_tag_priorities": [{"demand_tag_id": 880921, "tier": 3}]

}


Response

Status code 200

Code Block
{
    "id": 638465,
    "account_id": 391,
    "name": "Tag Name Docs",
    "active": true,
    "rate": "0.01",
	...
    "spotx_connect_enabled": true,
    "supply_spotx_connects": [
        {
            "spotx_connect_id": 893715
        }
    ],
	"demand_tag_priorities": [{"demand_tag_id": 880921, "priority": 1, "tier": 3, "locked": False, "ratio": None, "slot_number": None, 	"slot_order": None}]
	...
}