Child pages
  • Attach Template to Group
Skip to end of metadata
Go to start of metadata

To attach a template to a group, use the following request:

POST /settings/image_template_groups/:image_template_group_id/relation_group_templates.xml
POST /settings/image_template_groups/:image_template_group_id/relation_group_templates.json

XML Request example:

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<relation_group_template><template_id>26</template_id><price>50</price></relation_group_template>' --url http://onapp.test/settings/image_template_groups/105/relation_group_templates.xml

JSON Request example:

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"relation_group_template":{"template_id":"26", "price":"50"}}' --url http://onapp.test/settings/image_template_groups/105/relation_group_templates.json

Returns HTTP 201 response on success.

XML Response example:

HTTP/1.1 201 Created
Date: Fri, 13 Jul 2012 13:47:11 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.9
X-UA-Compatible: IE=Edge,chrome=1
ETag: "403f2b5e3b43d9de14cfc5b270bce92d"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: a305669856a4dc3fe659a6180ee8532c
X-Runtime: 0.340259
X-Rack-Cache: invalidate, pass
Set-Cookie: _session_id=02ec3365a7e219071ab840838551661d; path=/; HttpOnly
Location: http://83.170.110.181/settings/image_template_groups/105/relation_group_templates/101
Status: 201
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8


#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels