See the Page Redirect documentation for information about page redirects.

GET https://api.cratejoy.com/v1/page_redirects/
PUT https://api.cratejoy.com/v1/page_redirects/{page_redirect_id}/
POST https://api.cratejoy.com/v1/page_redirects/

List page redirects

GET https://api.cratejoy.com/v1/page_redirects/
$.get("https://api.cratejoy.com/v1/page_redirects/");
{
  "count": 1,
  "next": "?page=1",
  "prev": null,
  "results": [
    {
      "id": 755285,
      "enabled": true,
      "path": "/my_old_blog_post.html",
      "code": 302, 
      "target": "https://oldsite.com/blog_post.html", 
      "type": "page_redirect", 
      "url": "/v1/page_redirects/755285/"
    }
  ]
}

Update a page redirect

PUT https://api.cratejoy.com/v1/page_redirects/{page_redirect_id}/
$.ajax({
    url: 'https://api.cratejoy.com/v1/page_redirects/755285/',
    contentType: 'application/json',
    type: 'PUT',
    data: { 'target': 'http://my.newsite.com/new_page.html' }
});

See the Page Redirect documentation for a complete list of writeable properties.

Create a new redirect

POST https://api.cratejoy.com/v1/page_redirects/
$.post("https://api.cratejoy.com/v1/page_redirects/",{
  	"path": "/my_old_blog_post.html",
		"target": "https://oldsite.com/blog_post.html",
		"code": 302,
		"enabled": true
});

See the Page Redirect documentation for a complete list of writeable properties.