GET /amazon/sp/ad_groups/123/keywords/
{
"kind": "collection",
"self": "/amazon/sp/ad_groups/123/keywords/",
"parent": "/amazon/sp/ad_groups/123/",
"items": [
{
"kind": "keyword",
"self": "/amazon/sp/ad_groups/123/keywords/11111",
"parent": "/amazon/sp/ad_groups/123/",
"state": "paused",
"keyword_text": "super8",
"match_type": "exact",
"bid": 1.2,
},
{
"kind": "keyword",
"self": "/amazon/sp/ad_groups/123/keywords/11112",
"parent": "/amazon/sp/ad_groups/123/",
"state": "paused",
"keyword_text": "super8",
"match_type": "broad",
"bid": 1.2,
}
]
}
GET /amazon/sp/ad_groups/123/keywords/11111
{
"kind": "keyword",
"self": "/amazon/sp/ad_groups/123/keywords/11111",
"parent": "/amazon/sp/ad_groups/123/",
"state": "paused",
"keyword_text": "super8",
"match_type": "exact",
"bid": 1.2,
}
POST /ad_groups/123/keywords/
[
{
"state": "paused",
"keyword_text": "super8",
"match_type": "exact",
"bid": 1.2,
},
{
"state": "paused",
"keyword_text": "super8",
"match_type": "broad",
"bid": 1.2,
}
]
PUT /ad_groups/123/keywords/
[
{
"id": 11111,
"state": "enabled",
"bid": 1.2,
},
{
"id": 11112
"state": "enabled",
"bid": 1.2,
}
]
Does it not make more sense to send the id of keywords in the ad group? I don't see why we'd put the resource paths in the requests.
The parent is already implicit in the path you're posting to as well.