Catalog JSON API Documentation

So, you want to develop some tooling around the Catalog API - perhaps some custom reports? Great! This API gives you everything that Catalog has to offer.

Authentication

Visit this page to create an API key. Once you’ve received your key, treat it like a password.

Use SSL for all requests to the API. Non-SSL requests will result in redirects, and your API key will be sent in the clear.

To authenticate, send the API key as a request header. Here’s an example using cURL:

curl https://www.my-catalog.edu/api/v1/products -H 'Authorization: Token token="my-api-key"'

Pagination

All index endpoints support pagination. Specifically, we implement RFC5988.

Pagination Options

You can use ?page= to set the page of data you want to retrieve. If no items exist for that page, the response will be a root key with an empty array.

curl https://www.my-catalog.edu/api/v1/courses?page=2

{
  "courses": []
}

To change the number of items returned for each page, you can use ?per_page=. This defaults to 20 and has a max of 100.

curl https://www.my-catalog.edu/api/v1/courses?per_page=40&page=2

Information about pagination is provided in the Link header. Here is an example of what the header could look like

curl -I https://www.my-catalog.edu/api/v1/courses?page=3

Link: <https://www.my-catalog.edu/api/v1/courses?page=4>; rel="next",  
      <https://www.my-catalog.edu/api/v1/courses?page=15>; rel="last",
      <https://www.my-catalog.edu/api/v1/courses?page=1>; rel="first",
      <https://www.my-catalog.edu/api/v1/courses?page=2>; rel="prev"

Let’s talk about what each link means. rel="next" lets us know that the next page of data is page=4. This make sense given that we requested page 3. rel="prev" lets us know that the page previous to the one we requested is page=2. rel="next" indicates the next page of data to request. rel="last" tells us the last and total number of pages of data that currently exist.

Not all rel= links will exist on every response. For instance, the response for the first page of data will not have rel="first" or rel="prev". The same is true for the last page of data. This means that you can programmatically traverse all pages of data by requesting the first page and continuing to request the rel="next" until the response does not contain a rel="next".

It’s important to note that altering the per_page= will change the total number of pages.

Catalogs

Listing catalogs

Endpoint

GET https://www.my-catalog.edu/api/v1/catalogs

Request

Route

GET https://www.my-catalog.edu/api/v1/catalogs

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this catalog. Integer
created_at The creation date for the catalog. Datetime
updated_at The last time the catalog was updated. Datetime
name The name of the catalog. String
canvas_domain Domain for the corresponding canvas account. String
canvas_id Id for the corresponding canvas account. String
logo URL for the catalog logo. String
locale Three character locale for the catalog. String
url Url for the catalog String
user_defined_fields An array of serialized user defined field records provided to the catalog either through direct assignment or inheritance. Array
user_defined_field[name] Name of the user defined field String
user_defined_field[label] Label that will be shown with the field String
user_defined_field[field_type] HTML input type of the field String
user_defined_field[required] Indicates if the custom field is required Boolean
parent[id] The id of the parent catalog Integer
parent[name] The name of the parent catalog Integer
settings[privacy_policy_url] Url of the privacy policy for this catalog. String
settings[terms_url] Url of the terms used for this catalog. String
settings[currency] Three character currency code. String
settings[time_zone] Timezone configured for this catalog. String
settings[country] Two character country code. String
settings[email_from_name] Name that appears as the sender in emails. String
settings[allow_user_registration] Indicates if new users allowed to enroll classes. Boolean
settings[title_tag] Used for custom titles in HTML. String
settings[meta_description] Used to a meta tag description in HTML. String
settings[custom_head_content] Used to add custom head content to HTML. String
settings[custom_body_content] Used to add custom body content to HTML. String
settings[show_listings_in_parent] Indicates if this catalogs listings will show in a parent catalog. Boolean

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: xqFskLv/qP0HftHwC2YXR2+P9XIBJerJzjMPOqIDXQh3kJA/mtNukfHDfZE7pZP3wcfhBE/a8es8MzZsB5VLmg==
Content-Type: application/json; charset=utf-8
ETag: W/"959fac8f3351adea93d9cbd3d5cadf03"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=NDNnbkRYMXVWazdxRHdJT2s2Yng4MERNaEEvaFlKeUhxbzVWeTVrTEt0UkRPZ1l0QnByZmtRMlNaMzlvbUp2N0RWeXI5Rm11dFFnQ3VvMk9qN21vT2Q4K3pOdk14STI1RCt0cnZ1dVpMTjlkMTErTkdTejhtYlVFaU91WUZzeXR0Z1phcngxb04yV3prQ2QxUnNxYTlxaitUSG9USXk0eWxQWVlHZURZREs3dHNBSVp0TkcrM09BRC91amxWTjA0LS04OW9BWnBES1lhVldPcHZqVGVmakFnPT0%3D--1dd8d4ea931e29c7b9c081efb8fafdfe4032777f; path=/; HttpOnly
X-Request-Id: e5383d87-66c9-4225-8eac-228d7ce24198
X-Runtime: 0.042786
Content-Length: 1044

Body

{
  "catalogs": [
    {
      "id": 45,
      "name": "Domain Account 30",
      "parent": null,
      "created_at": "2015/08/27 22:03:42 +0000",
      "updated_at": "2015/08/27 22:03:42 +0000",
      "canvas_domain": "www.canvas-domain-30.com",
      "canvas_id": 30,
      "settings": {
        "privacy_policy_url": "http://www.canvaslms.com/policies/privacy-policy",
        "terms_url": "http://www.canvaslms.com/policies/terms-of-use",
        "currency": "USD",
        "time_zone": null,
        "country": "US",
        "email_from_name": "Canvas Catalog",
        "allow_user_registration": true,
        "title_tag": null,
        "meta_description": null,
        "custom_head_content": null,
        "custom_body_content": null,
        "show_listings_in_parent": true,
        "order_id_prefix": null,
        "inherit_user_defined_fields": true,
        "beta_canvas_domain": null
      },
      "user_defined_fields": [
        {
          "name": "favorite_color",
          "label": "Favorite Color",
          "field_type": "text",
          "required": false
        },
        {
          "name": "code_of_conduct",
          "label": "Code of Conduct",
          "field_type": "checkbox",
          "required": true
        },
        {
          "name": "age",
          "label": "Age",
          "field_type": "text",
          "required": true
        }
      ],
      "logo": "http://www.account-logos.com/logo-45.png",
      "locale": "en",
      "url": "http://www.my-catalog.edu"
    }
  ]
}

Certificates

Creating a Certificate

Endpoint

POST https://www.my-catalog.edu/api/v1/certificates

Parameters

Name Description Type
certificate[listing_id] required Id of the Listing Integer
certificate[name] required Name of the Certificate String
certificate[active] State of the Certificate, defaults to true Boolean
certificate[template] required Template for Certificate contents String
certificate[pdf_settings][orientation] 'Landscape' or 'Portrait' mode for PDF. Defaults to Landscape. String

Request

Route

POST https://www.my-catalog.edu/api/v1/certificates

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "certificate": {
    "listing_id": 3,
    "name": "API Name",
    "active": true,
    "template": "<H1>This is a template</h1>",
    "pdf_settings": {
      "orientation": "Landscape"
    }
  }
}

Response

Simulated Response

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Location: https://www.my-catalog.edu/certificates/1
X-CSRF-Token: 33jp4XyC3zC+D1M7BRiDQjR8Qwh0eQYMXVytyS8NNi7c4HgH4FOed02GAWwmNzfcad13kyE5ybKDLlqW+R5Iwg==
Content-Type: application/json; charset=utf-8
ETag: W/"cc52b3e879bf1c57f37bd05abb7f0c0e"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=bW1tSExMaEVTSDVoK0JFcWF2anlzYTNURzV2emhpTGNRZDE4VDltY1Zwd2VRZjI1RytHUTZYOTRiTDBXVXYwVE85VG1MMlZET2U3Q29HM2x6dHgvRTZJbWIzVU9KUTI5dlp1UTVjdWVlQVNEUjB0QWo5Mm5OSi9qRzN1T3VJaWFyazIrSHV6MEE2YnZRQmNmdC8xMU8yUnh1YjB3eS9sbjVkdzB1cnRYdExKY1VzcCtCMnZMZ3lPZEN2RzkvY2t6LS1YL0U3UXlDNXdOY1hUSDlVNTByMWtRPT0%3D--a0cf050bebad826beb9ce4587ef22b753811d417; path=/; HttpOnly
X-Request-Id: e23cb715-256d-4fed-9429-f6b8504a7020
X-Runtime: 0.085598
Content-Length: 257

Body

{
  "certificate": {
    "id": 1,
    "listing_id": 3,
    "name": "API Name",
    "active": true,
    "template": "<H1>This is a template</h1>",
    "pdf_settings": {
      "orientation": "Landscape"
    },
    "created_at": "2015/11/18 20:14:12 +0000",
    "updated_at": "2015/11/18 20:14:12 +0000"
  }
}

Courses

Creating a course

Endpoint

POST https://www.my-catalog.edu/api/v1/courses

Parameters

Name Description Type
course[title] required Listing title String
course[description] required Full listing description String
course[path] required Path to the listing. Used in URLs String
course[teaser] required A shorter description of the listing String
course[enrollment_open] Indicates if the listing is current accepting new students Boolean
course[visibility] Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
course[enrollment_cap] A limit for the total number of enrollments Integer
course[enrollment_fee] Enrollment fee Decimal
course[days_to_complete] The number of days a student has to complete the requirements Integer
course[account_id] The id of the account to associate the listing to. Can be an id of any subcatalog of the catalog making the API request. Defaults to the catalog making the API request. Integer
course[list_order] Order in which the listing is shown in the catalog Integer
course[waitlist] Waitlist enabled (defaults to false) Boolean
course[canvas_course_id] required Id of the related canvas course Integer
course[credits] Credit value of the course Decimal

Request

Route

POST https://www.my-catalog.edu/api/v1/courses

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "course": {
    "title": "Course 1",
    "description": "This is a very important course.",
    "path": "course-1",
    "canvas_course_id": 10010010,
    "teaser": "This is an example teaser",
    "enrollment_open": true,
    "visibility": "listed",
    "enrollment_cap": 150,
    "waitlist": true,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "credits": 4
  }
}

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this listing. Integer
visibility Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
enrollment_open Open for enrollment Boolean
enrollment_cap A limit for the total number of enrollments Integer
waitlist Waitlist enabled Boolean
title Title of the listing String
enrollment_fee Enrollment fee Decimal
currency The three digit currency code associated to the enrollment fee String
listing_path Path to the listing. Used in URLs String
short_description A short description for this listing String
list_order Order in which the listing is listed in the catalog Integer
catalog[id] Id for the catalog that owns this listing Integer
catalog[name] Name for the catalog that owns this listing String
created_at The creation date for the listing. Datetime
updated_at The last time the listing was updated. Datetime
canvas_course[id] Corresponding Canvas id Integer
credits Credit value of the course Decimal

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Location: https://www.my-catalog.edu/api/v1/courses/5
X-CSRF-Token: vYBCLE2CuqfNqXWWGI3tT5HmkNQLri0KNQ9L1HsXdZlAwO7WV0mjwkc5ybj1WgGpJMbn+dN3vMac8SUbHla9lw==
Content-Type: application/json; charset=utf-8
ETag: W/"c560dd6f57b893c2a074f3fe4fc4cf32"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=c2Rha0hENDFuczJCeHZqcU9ZMjhLUWJ2cG04WDdUdWtFdWpTemdxU3BxVzBERkMvL0FnZnJwcFdCS2dEMFB0YmsrajJ0eE13b3ZvTERTeUlGRk9ocjBvLzN4U3ZLQmlFVFRJZ2RvdGN2aU9meEFNc0lWTWlNc3ZGcUZXc050amNLK2VrUVFsMk9yMHZnaEplOFFNQUFDWFJ6S3J6WXZnM0RlZGxwTWhFZHlBZENWVmxTWGJod3FsMWFsZysrSlVDLS10bmJwaEFuTHE4NlVkN21FM0hEK213PT0%3D--f771d6d03b40b03eeee8a87ca887c937268a5c46; path=/; HttpOnly
X-Request-Id: fbbdb04a-b423-47c3-a09a-d4a3ff7ec16e
X-Runtime: 0.049129
Content-Length: 493

Body

{
  "course": {
    "id": 5,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": 150,
    "description": "This is a very important course.",
    "enrollment_fee": "49.99",
    "created_at": "2016/03/10 20:28:50 +0000",
    "credits": "4.0",
    "updated_at": "2016/03/10 20:28:50 +0000",
    "short_description": "This is an example teaser",
    "listing_path": "course-1",
    "currency": "USD",
    "catalog": {
      "id": 5,
      "name": "Domain Account 5"
    },
    "type": "Course",
    "title": "Course 1",
    "list_order": 123,
    "waitlist": true,
    "canvas_course": {
      "id": 10010010
    }
  }
}

Deleting a specific course

Endpoint

DELETE https://www.my-catalog.edu/api/v1/courses/:id

Request

Route

DELETE https://www.my-catalog.edu/api/v1/courses/32

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Content-Type: application/x-www-form-urlencoded
Cookie: 

Response

Simulated Response

Status

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: CzR395mwflPJlGPbHup54mugWQmJmBLOSZcpPhFzR3IPmJB9h4QQKSKhyiU16FjZKh4gVMGQLpmwrVER9alWEw==
Cache-Control: no-cache
Set-Cookie: _gallery_session=b3pMcG5INUZnMWJnUXgyVTBTek10U3MzMnFvdGZ5NWNVcU1mdjFBZXkvQi9KUG8xS2VQMkhEaWJTVjZ3Q0lHOUVNTG5QaUFSU3VHcDkxaDBFVzBKWDVwUmdJbG1JTXMzN05Yb2ZXYmlCSmg3S011c1lFdEorUER6Y1RjUGJYbmJsdERuTktDRXdMd2l1QkJ4OG9qZ2czZUFMVjBKMjBoaVpkeXJ4NkRXNiswSXNrMEM5Mk90UjYrM0pIR2tBeEN2LS1BdGw3bVNoVmFlUkRvM1dwYlFVa0VBPT0%3D--8ed4240f17e0721b204fd9a6705b981dedced164; path=/; HttpOnly
X-Request-Id: caf6abbf-8fd9-4bd7-9cce-eb5f461a44cd
X-Runtime: 0.023599

Getting a specific course

Endpoint

GET https://www.my-catalog.edu/api/v1/courses/:id

Request

Route

GET https://www.my-catalog.edu/api/v1/courses/4

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this listing. Integer
visibility Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
enrollment_open Open for enrollment Boolean
enrollment_cap A limit for the total number of enrollments Integer
waitlist Waitlist enabled Boolean
title Title of the listing String
enrollment_fee Enrollment fee Decimal
currency The three digit currency code associated to the enrollment fee String
listing_path Path to the listing. Used in URLs String
short_description A short description for this listing String
list_order Order in which the listing is listed in the catalog Integer
catalog[id] Id for the catalog that owns this listing Integer
catalog[name] Name for the catalog that owns this listing String
created_at The creation date for the listing. Datetime
updated_at The last time the listing was updated. Datetime
canvas_course[id] Corresponding Canvas id Integer
credits Credit value of the course Decimal

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: iyQRdf6+22/ylexGR8YQLFmiW0Q50AWdfpGzOhQlbBqDN0YMPfKP7eHesKyJbu/6Q4D5i1QCVxLaIEGl8F4fqA==
Content-Type: application/json; charset=utf-8
ETag: W/"7bdd665d10d1e639e70306be2c3ab107"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=OE1waFUxajBNUEJnS1VHVDhoT3ltSjlsSUQyMzEyc0N0WW5XMU5rUURtRFUrQUdRcTBQanBKUUV5TGh2UHl2ZUJuekVQaHN6TUo3MUJXVnlUVUswMjVTdzdrTUVnWTlRWnBwWTJvRjREbFQ0Zk9hVERlaWJ4Y3U4MHFJZnh1RnpZc1NQSU5SQzlkZ1hoSDBBMTNuQS9MUDBRYk1rWkpPTitEcCtYUTZsWE4vQTduZ2V4UGl2eVNZckZMYk92OE5KLS1ZandpaVQ2UXRoWmMrVlVSOGo5Z1NnPT0%3D--958f64e36f8daacfd0bad3ccf11653ee739fc20e; path=/; HttpOnly
X-Request-Id: 12267461-548a-4e07-9627-a71b34c5c5b2
X-Runtime: 0.031788
Content-Length: 456

Body

{
  "course": {
    "id": 4,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": null,
    "description": "description_4",
    "enrollment_fee": "0.0",
    "created_at": "2016/03/10 20:28:50 +0000",
    "credits": "3.0",
    "updated_at": "2016/03/10 20:28:50 +0000",
    "short_description": "teaser_4",
    "listing_path": "course-path-4",
    "currency": "USD",
    "catalog": {
      "id": 4,
      "name": "Domain Account 4"
    },
    "type": "Course",
    "title": "Course 4",
    "list_order": null,
    "waitlist": false,
    "canvas_course": {
      "id": 4
    }
  }
}

Listing courses

Endpoint

GET https://www.my-catalog.edu/api/v1/courses

Request

Route

GET https://www.my-catalog.edu/api/v1/courses

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: 3yhyfzc3tOWMWznQb9dY4Vc9HKw5kt+RI6Xf39EqaRucTi2ftP2CbiBVi5dXhy9snFeBxzyqe1D2JThJLPbdUA==
Content-Type: application/json; charset=utf-8
ETag: W/"0e80054b76a20aebd8e8b4c93945a3ff"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=eG83OE9xR2w5ZVY5OFJmMVlBaXZWTHYvUWhWb3dwWG53RitBcUJlWnJ3a1ppRStYK085UEZRbTVEQmpPM2w3eWdIMU4vdGhGK3FjWVhJTENHYTVDUkhKMTZxQzRkbjN0QmFidkNJQXpaZEdQK1JtT1IyTENnWWg1cHp0WEMxVGdPa3FXcFdlLzd2NFhjM1hoRE9wYzdmWmRVK2J0eVlDNmVGaXpKVnM1VkNpd0NpVHhMTCt5anRmZUlRbDFvOWthLS0xb203aXorbDNQbGx4RkdneUNEckd3PT0%3D--0dcbee48bb6c326c72f0f1f0d1a7e4acba0f22c8; path=/; HttpOnly
X-Request-Id: d5ba355e-4f9f-4772-b829-9f64ec81f79b
X-Runtime: 0.026804
Content-Length: 459

Body

{
  "courses": [
    {
      "id": 2,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_2",
      "enrollment_fee": "0.0",
      "created_at": "2016/03/10 20:28:50 +0000",
      "credits": "3.0",
      "updated_at": "2016/03/10 20:28:50 +0000",
      "short_description": "teaser_2",
      "listing_path": "course-path-2",
      "currency": "USD",
      "catalog": {
        "id": 2,
        "name": "Domain Account 2"
      },
      "type": "Course",
      "title": "Course 2",
      "list_order": null,
      "waitlist": false,
      "canvas_course": {
        "id": 2
      }
    }
  ]
}

Updating a course

Endpoint

PUT https://www.my-catalog.edu/api/v1/courses/:id

Parameters

Name Description Type
course[title] Listing title String
course[description] Full listing description String
course[path] Path to the listing. Used in URLs String
course[teaser] A shorter description of the listing String
course[enrollment_open] Indicates if the listing is current accepting new students Boolean
course[visibility] Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
course[enrollment_cap] A limit for the total number of enrollments Integer
course[enrollment_fee] Enrollment fee Decimal
course[days_to_complete] The number of days a student has to complete the requirements Integer
course[account_id] The id of the account to associate the listing to. Can be an id of any subcatalog of the catalog making the API request. Defaults to the catalog making the API request. Integer
course[list_order] Order in which the listing is shown in the catalog Integer
course[waitlist] Waitlist enabled (defaults to false) Boolean
course[canvas_course_id] Id of the related canvas course Integer
course[credits] Credit value of the course Decimal

Request

Route

PUT https://www.my-catalog.edu/api/v1/courses/3

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "course": {
    "title": "Course 1",
    "description": "This is a very important course.",
    "path": "course-1",
    "canvas_course_id": 10010010,
    "teaser": "This is an example teaser",
    "enrollment_open": true,
    "visibility": "listed",
    "enrollment_cap": 150,
    "waitlist": true,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "credits": 4
  }
}

Response

Simulated Response

Status

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: 7o9o6QJrdWdTnqCe+Pa9CmPB2gi/C1yBT2M19QLTsX+iG7CCceyg7hdhYoe/WFpaKBWBbRSazbg0Gi9/cMMWtw==
Cache-Control: no-cache
Set-Cookie: _gallery_session=dTVFazJpZzFlUXg5eFVHVHRqZ0ROVnMwY0k0d3ZFNkUrUHI3NSt1YTJpcW1Nb255djZmOGF1bHBxVFNIWkpjSXVjNVJTUXNKZ1BlT2JjTk5KNDdZQUVmMU1yQTFSS20ra0lBRWphRnk5K29tWTh2cGQyWm8vckpXeE1KUzhNM3pNYVpxNlhxb1pWNHM4c0VsYlNQQVNWajlYWFIzTmhEc0thZTh5Q1NvQUlFMFpqbEtyR3Vyc0xpTkNIczRRSnZjLS05eTA5Q2VTSDRhRXpad2FyMlMzU1F3PT0%3D--1a4b11cc8c4421131f09b2b2d23bf8729c26232b; path=/; HttpOnly
X-Request-Id: d8c8d22f-9780-4fa8-bdd1-830c8f80ccfc
X-Runtime: 0.067144

Enrollments

Creating an enrollment

Endpoint

POST https://www.my-catalog.edu/api/v1/enrollments

Parameters

Name Description Type
create_order Create an order record for this enrollment, defaults to false Boolean
enrollment[listing_id] required Id of the Listing Integer
enrollment[canvas_user_id] required Id of the Canvas user Integer

Request

Route

POST https://www.my-catalog.edu/api/v1/enrollments

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "enrollment": {
    "listing_id": 3,
    "canvas_user_id": 1
  }
}

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this enrollment Integer
user[id] Corresponding Canvas user id for this enrollment. Integer
listing[id] Identifier for the listing Integer
listing[title] The name of the listing String
listing[type] The type of listing (Course or Program) String
listing[canvas_course_id] Canvas course ID (nil for Program enrollments) String
enrolled_at The time of enrollment (UTC) Datetime
status Enrollment status (active or dropped) String

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: qxhs0mXpupm/nwFNehhyNFjX5T7+WTiGiA3bIR38PSlfUzAr/SKV1Vq2/xmPf1SXN6Z6JRkyuQDK3I1ZG0n01w==
Content-Type: application/json; charset=utf-8
ETag: W/"8757ef630b1acff31d4313c8e3c3f8b8"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=UFMrUlNnSVVZcXQ1WTQ0K3NGajlHaVJ5QlJ1akQ5S1pLOXJSelUxQW1NM3A0R0lMdmRBdDJPanV0d2JockgvNjVMTGdtN1hUeFBhd0NWL0QwTDh4MW80UUppZmdQTGpicUFGQkdITlk2NGE3T1ZVSGFxTWRCTHFvZGVHQ3V6TVlBODJnbitkNzNJRGZjL0dsQXNubDNxWWpBbThjVmxSM1hiSWcrdDFoQUd5OVYreE4waXdoK3RjYkw5S0g3TjduLS1PNlZZbXNTZ3I4bXgybEFYWTR1d2lRPT0%3D--cefcadaa0ac18939d44e7083f90fe53812723cf6; path=/; HttpOnly
X-Request-Id: 9f89550a-8e07-4db2-a1fd-b4322274de09
X-Runtime: 0.072305
Content-Length: 174

Body

{
  "enrollment": {
    "id": 3,
    "user": {
      "id": 1
    },
    "listing": {
      "id": 3,
      "title": "Course 3",
      "type": "Course",
      "canvas_course_id": 3
    },
    "enrolled_at": "2016/01/05 20:50:26 +0000",
    "status": "active"
  }
}

Getting a specific enrollment

Endpoint

GET https://www.my-catalog.edu/api/v1/enrollments/:id

Request

Route

GET https://www.my-catalog.edu/api/v1/enrollments/2

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this enrollment Integer
user[id] Corresponding Canvas user id for this enrollment. Integer
listing[id] Identifier for the listing Integer
listing[title] The name of the listing String
listing[type] The type of listing (Course or Program) String
listing[canvas_course_id] Canvas course ID (nil for Program enrollments) String
enrolled_at The time of enrollment (UTC) Datetime
status Enrollment status (active or dropped) String

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: BQ+ca/7mwphAC0O/WlHWZx6rgpfsSLTqfHi3pxVZN8pe4zKXPs+jTWGZnrLfKyIIXdUjSPaqB0M88nysH+629Q==
Content-Type: application/json; charset=utf-8
ETag: W/"323a3f0febee6c82c3d4083268180ce1"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=TGNDcXJvUXpMNkxNU1FNaGY3azA0a3A4eEQybE9JRG1RbUxEVHMrL1dwbUhyMmI1alJ5V29POER6MFBiYjdXZ3BvMkMvU3VueGxlYURBYm5RTEV3MUtnMldFMHFUNXhMd0x5T2RuTENuZkttVVM1N2QwSndDU2Rvd3lvT085d2Q5WlhHMlN5aStPVlpOZWd2Mmp3SCtTQUNKSWx4LzJ3QUVDQnozNVFNK1pMcjR4dnJnYVNjMWRjc09GMVl2aHd6LS0vZHJ6NnBXNldKSWdJNDdzMHlVeHZnPT0%3D--984e2bab6f3db376321505b8d8237191b50f15b3; path=/; HttpOnly
X-Request-Id: f52f6470-e329-480f-a946-2f8a9d2a5368
X-Runtime: 0.049249
Content-Length: 174

Body

{
  "enrollment": {
    "id": 2,
    "user": {
      "id": 2
    },
    "listing": {
      "id": 2,
      "title": "Course 2",
      "type": "Course",
      "canvas_course_id": 2
    },
    "enrolled_at": "2016/01/05 20:50:26 +0000",
    "status": "active"
  }
}

Listing enrollments

Endpoint

GET https://www.my-catalog.edu/api/v1/enrollments

Parameters

Name Description
listing_id Only include enrollments for the specified listing (optional, Integer)

Request

Route

GET https://www.my-catalog.edu/api/v1/enrollments

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: bPdxavITJDU3ciF0eClzKdltOFU9iIjx1s/yLFke4aDZkumEupuWza6v/Op3dKgS/t56nRE0c7eilZkFMYwfsg==
Content-Type: application/json; charset=utf-8
ETag: W/"b1ec2d4075fa53d039c2675bc69f5916"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=MVYzWDYvZEovb08reXI4aTJ2M0J3UDFVQWhBWjJZV3BXcXlVeWl1Wi9NWDk5d3pucDRnMzYwc1Y5R1p1Um5vR2FSWjBneDNvUjdXOXVUcTlTK1o5ZzBqWDhyTDNpTHUrMktUSmYzQjZ5cTVSbjdRWUFBOE1hWkVmaVVES2N4bnJyMjNFdTlRUEVuYWREc0Ntekk0djRXS1NHNDFsMEJPNW9DZ2JCajZ2Y1JlMU40STVNQ2s0VWNxVVRabVRFUUpkLS1FQ3B2aEU2V2xmbjdyUkFUVVVERFhBPT0%3D--d538207cfef62796978516469bcb16d3641db982; path=/; HttpOnly
X-Request-Id: 644706b1-c8cd-4073-8560-10fd405daf13
X-Runtime: 0.092032
Content-Length: 177

Body

{
  "enrollments": [
    {
      "id": 1,
      "user": {
        "id": 1
      },
      "listing": {
        "id": 1,
        "title": "Course 1",
        "type": "Course",
        "canvas_course_id": 1
      },
      "enrolled_at": "2016/01/05 20:50:25 +0000",
      "status": "active"
    }
  ]
}

Orders

Getting a specific order

Endpoint

GET https://www.my-catalog.edu/api/v1/orders/:id

Request

Route

GET https://www.my-catalog.edu/api/v1/orders/1

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this order. Integer
full_id Full ID for this order, including prefix. String
catalog_id DEPRECATED: Use catalog['id'] instead. Integer
catalog[id] Identifier for the catalog the order is linked to Integer
catalog[name] Name of the catalog this order is linked to String
user[id] Canvas ID of the user who placed the order Integer
user[name] Name of the user who placed the order String
user[email] E-mail address of the user who placed the order String
listings Array of purchased listings (courses and programs). Fields below: Array
listing[id] Identifier for a listing purchased with this order Integer
listing[canvas_course_id] Canvas course ID associated to this listing Integer|null
listing[title] The name of the listing String
listing[amount] Listing price at the time of purchase Decimal
promotions Array of promotions used. Fields below: Array
promotion[id] Identifier for a promotion used with this order Integer
promotion[code] Promo code used for this order String
promotion[amount] Discount amount Decimal
payments Array of payments. Fields below: Array
payment[reference_id] Identifier from the payment redirector String
payment[status] Status of the payment. Can be success, error, or pending. String
payment[amount] Amount of the payment Decimal
total Total cost charged to the user Decimal
currency Currency used for the transaction String
purchased_at Time the transaction was successfully completed. This field is nil for unsuccessful or unpaid orders. Datetime
created_at Time the order was initiated. Datetime

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: Gy5Zw/UIJcwWDYJ0QYovFXYxkmE8I48aJGF3Oh0RgvDnFoq+0JKNnwWJIkt3oLTke9MPEoiIjv/dF8ARm/qMjQ==
Content-Type: application/json; charset=utf-8
ETag: W/"cf2d9cefc5567bdf4f7e86d8ae67f5c4"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=eUJVM2U3Smt2eWxCL3NWdjNzbGNqOW1Na2xBVmdqVTFOTE1taUZNbnh2UHpCVDZEMXlBTnhVdC9xajBXd3owd0VuTHpHaGFuQmI2bXpPQ09qYlUrWEhiakpuWlgxK1ZMQlJld296M05obzhJc1dFNEdlZktETEg2eU9IZEJuemdhbEFhR01FbDlkMDY5Q2hvNlg4bmU5a0JPclkzcFRXbWNON3k0Z2N2UHY3R242VWFrZEJTY05pcGRrNHFLOW5BLS15U3JkVm1NN3gzMlJIL1NYb3VPZVZ3PT0%3D--d26cb97e94791b03f16dcb96cac255ccb9bc4d29; path=/; HttpOnly
X-Request-Id: f9ec1d47-13d0-4d19-9c79-2b96ba99ae89
X-Runtime: 0.048177
Content-Length: 489

Body

{
  "order": {
    "id": 1,
    "full_id": "1",
    "catalog_id": 47,
    "catalog": {
      "id": 47,
      "name": "Domain Account 32"
    },
    "user": {
      "id": 1,
      "name": "Saul Goodman",
      "email": "bettercall@saul.com"
    },
    "listings": [
      {
        "id": 28,
        "canvas_course_id": 18,
        "title": "Course 27",
        "amount": "100.0"
      }
    ],
    "promotions": [
      {
        "id": 1,
        "code": "PROMO1",
        "amount": "-10.0"
      }
    ],
    "payments": [
      {
        "reference_id": "123",
        "status": "success",
        "amount": "90.0"
      }
    ],
    "total": "90.0",
    "currency": "USD",
    "purchased_at": "2015/09/04 20:58:37 +0000",
    "created_at": "2015/09/04 20:58:37 +0000"
  }
}

Listing orders

Endpoint

GET https://www.my-catalog.edu/api/v1/orders

Parameters

Name Description
from Earliest date/time to return (optional, String). Suggested format YYYY-MM-DDTHH:MM:SSZ, e.g. 2018-01-01T00:00:00Z. System time zone is UTC.
to Latest date/time to return (optional, String). See 'from' above for format.
canvas_user_id Return only orders for the specified Canvas user ID (optional, String|Array)
completed When set, only return orders that were completed successfully (optional)

Request

Route

GET https://www.my-catalog.edu/api/v1/orders

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: 4a8uVaNBh/QuJoX9orX61EaZ+KBaiGZqttiCqXAsRUW1tkGzUEaXvO2oqibD7zEbvXWSa0fwNGskX1GQyen+hQ==
Content-Type: application/json; charset=utf-8
ETag: W/"fa692742475074899968cd89b8c165ee"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=b1dnMXFBUkxuVmtUYWNOVEVIam9ycXNBdk5NUXdWMTBURHR0SGxZaXl3Y2MyaFBONmdYdzFSVTIwdlY3MzZ6RURtM1hkZllqWnhHY1JwbDNrSWMxN2pYUFNFZDdZSVQrNlNWUVhZZitOam04Yk0waUd1dXVkaFBSc0VzK1BobGpuallEd3VIemlyL2ExcWEwYXBxT3V2OEx2czBGZ3RIbU0xZTNEMHB1T0xuVkhIeTg4T2UwZ3FkQkozVG92allmLS1UdWF2Yzk3TjVLSWgveFp4Y05hUTl3PT0%3D--496544d1c683b874f918bc52158b7489584f107f; path=/; HttpOnly
X-Request-Id: 74066d25-09d9-4e27-a281-32071abf5331
X-Runtime: 0.027331
Content-Length: 492

Body

{
  "orders": [
    {
      "id": 2,
      "full_id": "2",
      "catalog_id": 48,
      "catalog": {
        "id": 48,
        "name": "Domain Account 33"
      },
      "user": {
        "id": 1,
        "name": "Saul Goodman",
        "email": "bettercall@saul.com"
      },
      "listings": [
        {
          "id": 29,
          "canvas_course_id": 19,
          "title": "Course 28",
          "amount": "100.0"
        }
      ],
      "promotions": [
        {
          "id": 2,
          "code": "PROMO2",
          "amount": "-10.0"
        }
      ],
      "payments": [
        {
          "reference_id": "123",
          "status": "success",
          "amount": "90.0"
        }
      ],
      "total": "90.0",
      "currency": "USD",
      "purchased_at": "2015/09/04 20:58:37 +0000",
      "created_at": "2015/09/04 20:58:37 +0000"
    }
  ]
}

Programs

Creating a program

Endpoint

POST https://www.my-catalog.edu/api/v1/programs

Parameters

Name Description Type
program[title] required Listing title String
program[description] required Full listing description String
program[path] required Path to the listing. Used in URLs String
program[teaser] required A shorter description of the listing String
program[enrollment_open] Indicates if the listing is current accepting new students Boolean
program[visibility] Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
program[enrollment_cap] A limit for the total number of enrollments Integer
program[enrollment_fee] Enrollment fee Decimal
program[days_to_complete] The number of days a student has to complete the requirements Integer
program[account_id] The id of the account to associate the listing to. Can be an id of any subcatalog of the catalog making the API request. Defaults to the catalog making the API request. Integer
program[list_order] Order in which the listing is shown in the catalog Integer
program[waitlist] Waitlist enabled (defaults to false) Boolean
program[requirement_ids] Ordered array of listing IDs that represent requirements for completing the program Array
program[sequential] Indicates if students are required to complete requirements in order Boolean

Request

Route

POST https://www.my-catalog.edu/api/v1/programs

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "program": {
    "title": "Program 1",
    "description": "This is a very awesome program.",
    "path": "program-1",
    "teaser": "This is an example teaser",
    "enrollment_open": true,
    "visibility": "listed",
    "enrollment_cap": 150,
    "waitlist": true,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "requirement_ids": [

    ],
    "sequential": true
  }
}

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this listing. Integer
visibility Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
enrollment_open Open for enrollment Boolean
enrollment_cap A limit for the total number of enrollments Integer
waitlist Waitlist enabled Boolean
title Title of the listing String
enrollment_fee Enrollment fee Decimal
currency The three digit currency code associated to the enrollment fee String
listing_path Path to the listing. Used in URLs String
short_description A short description for this listing String
list_order Order in which the listing is listed in the catalog Integer
catalog[id] Id for the catalog that owns this listing Integer
catalog[name] Name for the catalog that owns this listing String
created_at The creation date for the listing. Datetime
updated_at The last time the listing was updated. Datetime
sequential Indicates if students are required to complete requirements in order Boolean
requirements A nested array of the programs requirements. This includes courses and subprograms which can be distinguished by the type key. Array
credits Cumulative credit value of the program's requirements Decimal

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Location: https://www.my-catalog.edu/api/v1/programs/28
X-CSRF-Token: 6jJyMUNtiVxKetiOmsnlu2fZUl4tXl6BhsD+2dbxuZPleFZIJr+aOlN37k1aKTY+rf5/wZ7K5py3G2CWsthAgw==
Content-Type: application/json; charset=utf-8
ETag: W/"8fbfb563958feead44aeea63b5ba7c02"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=bnh3Umd5cWhQY2c0NitETmlOdnFRT3dhcXcyRHdQTFUrbzRVWVkyNjF6alA0aGkzalBzdVdCQXduTi91aXNuT0hkY00ya0NyeklVR1E0SWdXZUFiRGk1ekg3TDJvVWxPZ2U3K0ZPcDc5Y3lQMlB6N2NoekxDN3NoQThzUlViM0NUWTFXWEpHelRDNjJBaURIbkJGUTQ1MVY4eUtYLytyMUU5bVl4a2x5VHlRbUtYZGVZUG1KTEUvNFFvdWM1ZUxzLS1tbDM2L09CUkhyemVLK2g0L3RxaEpnPT0%3D--d3aa5e94661ae831403eceff1933bb4e228fff74; path=/; HttpOnly
X-Request-Id: b5293e80-d26f-48cc-8a6a-64822aa082c3
X-Runtime: 0.043799
Content-Length: 502

Body

{
  "program": {
    "id": 28,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": 150,
    "description": "This is a very awesome program.",
    "enrollment_fee": "49.99",
    "created_at": "2016/03/10 20:28:51 +0000",
    "credits": null,
    "updated_at": "2016/03/10 20:28:51 +0000",
    "short_description": "This is an example teaser",
    "listing_path": "program-1",
    "currency": "USD",
    "catalog": {
      "id": 13,
      "name": "Domain Account 13"
    },
    "type": "Program",
    "title": "Program 1",
    "list_order": 123,
    "waitlist": true,
    "sequential": true,
    "requirements": [

    ]
  }
}

Deleting a specific program

Endpoint

DELETE https://www.my-catalog.edu/api/v1/programs/:id

Request

Route

DELETE https://www.my-catalog.edu/api/v1/programs/15

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Content-Type: application/x-www-form-urlencoded
Cookie: 

Response

Simulated Response

Status

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: XWqV/SVujNrqh8iJYCbYbS4+OAQKO6A63WWxFWm3QjpfGS7O5sULIJp3CFwdmlgGfqjJTVqK1xVUe1fPSaaZhA==
Cache-Control: no-cache
Set-Cookie: _gallery_session=djhVdktLVFV2dDQwZ0lWazVITng5QXZjb1JiYnNmK3k2b01KeGZaOThRbWdWOGNLSTM2bFN5aksrbUVsNFhLcW5FbC9JcW1VRmNyMXR2RTR0N3ZobVoxYjlwSUVsaXU2bmRheDlkcFFZRTlIcjYxOWpwNkE1a050QzRib2hnb04wWS9KUjIxRkxXYm1YSmloN0Z5aFdYYzNjMnEvdHp6azRoVFE4NnA3VThxdzhKZU5EaGl4Ty81NExvY3dsVnRiLS1aZW1XYUptVE9CalFPSmpIUEx0dkRnPT0%3D--43e83188bf9f53294557f9dbb077a06ba4e02584; path=/; HttpOnly
X-Request-Id: 59d315a7-9670-4eab-9e5a-f022e641cde2
X-Runtime: 0.064059

Getting a specific program

Endpoint

GET https://www.my-catalog.edu/api/v1/programs/:id

Request

Route

GET https://www.my-catalog.edu/api/v1/programs/22

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this listing. Integer
visibility Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
enrollment_open Open for enrollment Boolean
enrollment_cap A limit for the total number of enrollments Integer
waitlist Waitlist enabled Boolean
title Title of the listing String
enrollment_fee Enrollment fee Decimal
currency The three digit currency code associated to the enrollment fee String
listing_path Path to the listing. Used in URLs String
short_description A short description for this listing String
list_order Order in which the listing is listed in the catalog Integer
catalog[id] Id for the catalog that owns this listing Integer
catalog[name] Name for the catalog that owns this listing String
created_at The creation date for the listing. Datetime
updated_at The last time the listing was updated. Datetime
sequential Indicates if students are required to complete requirements in order Boolean
requirements A nested array of the programs requirements. This includes courses and subprograms which can be distinguished by the type key. Array
credits Cumulative credit value of the program's requirements Decimal

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: x991qhquIUxQqWkoNR360qJGDJrmT83xRR4OLrLykJg6boN441lT1Nuz91UKAzGx4uAWmEuT54SKYJnwLh8hAA==
Content-Type: application/json; charset=utf-8
ETag: W/"41734572888559e10d10c3fffa7e6667"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=UHdHb1dkNUVObmVJdXVWR2ZZWlg2V1dTcDVxSHdiS2RvS1JaNlBZd3Bocm9Db2U0MDUwNkh5YjVvZk5SL3NPZjBDY0FmQWt4bEs3bWZ0ZjZ3SWNIWmp3TWxIRjhVOUd6aFdiQnd4clFBbkFVYThENmNLU1E4bjE3MVJZUXlib1ZlOUpiT1V2bExXaTZkSjhpN0plcmx5SkJlWS8vSlVoQkNwWTArL3Y3YWFDRUhXR2hpcm1nRFArYVdSdExIOXR0LS1KNVVkbUJKNWVsL3BpbjRIUkhVc0dnPT0%3D--7379b9479989dbfc2596a5026eec6b6fb28f2fa3; path=/; HttpOnly
X-Request-Id: 58cbd41e-268b-409f-85dc-7f9aa6b80641
X-Runtime: 0.040658
Content-Length: 823

Body

{
  "program": {
    "id": 22,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": null,
    "description": "description_21",
    "enrollment_fee": "0.0",
    "created_at": "2016/03/10 20:28:51 +0000",
    "credits": "9.0",
    "updated_at": "2016/03/10 20:28:51 +0000",
    "short_description": "teaser_21",
    "listing_path": "program-path-21",
    "currency": "USD",
    "catalog": {
      "id": 12,
      "name": "Domain Account 12"
    },
    "type": "Program",
    "title": "Program 21",
    "list_order": null,
    "waitlist": false,
    "sequential": true,
    "requirements": [
      {
        "id": 23,
        "type": "Program",
        "title": "Program 22",
        "requirements": [
          {
            "id": 25,
            "type": "Course",
            "title": "Course 24",
            "canvas_course": {
              "id": 14
            }
          }
        ]
      },
      {
        "id": 24,
        "type": "Program",
        "title": "Program 23",
        "requirements": [
          {
            "id": 26,
            "type": "Course",
            "title": "Course 25",
            "canvas_course": {
              "id": 15
            }
          },
          {
            "id": 27,
            "type": "Course",
            "title": "Course 26",
            "canvas_course": {
              "id": 16
            }
          }
        ]
      }
    ]
  }
}

Listing programs

Endpoint

GET https://www.my-catalog.edu/api/v1/programs

Request

Route

GET https://www.my-catalog.edu/api/v1/programs

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 3
Per-Page: 20
X-CSRF-Token: OPkOO5al+zd9vromURRVt/7LE939/tQrxTKZPxW7OdgDovQmUNI7NfGl3qK8E1hkidscYDmIPALfrRAzarqdqg==
Content-Type: application/json; charset=utf-8
ETag: W/"1cbf4e275256f8970f8a7976cfd4ba46"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=V0FlaWd5b2NQdlUyMUlWTjJsL3JVdHZtUzhQbmtocm82UlJTKzBFYmhZQkVROEhRVUVaZXFEVWQrcnBxMmFqdkZrc2V2bm4xK2hsdEJDZGJ3S0dIbkhmcmsrelNjZUpmS1VoLzNSKytOUW9LdjJrT2orVHhGK0VQUzRBYXR4QkoyK1lEOCtUbWxGRkxhc3JkS3J0OGQ1MWZEdnRLdFZESHdjYUV3dUhCeVROMnJZdk1DbnEwNzkyMEhBRm5ULzJNLS1XWFdDVGdDV3pwVHRRNnhPcUVUelJRPT0%3D--44613ac7e6ab99ea51a3b806d5c1d0de4422c1d4; path=/; HttpOnly
X-Request-Id: ef4a684f-17d2-4f98-84ff-84c830b44993
X-Runtime: 0.058180
Content-Length: 1966

Body

{
  "programs": [
    {
      "id": 10,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_9",
      "enrollment_fee": "0.0",
      "created_at": "2016/03/10 20:28:50 +0000",
      "credits": "9.0",
      "updated_at": "2016/03/10 20:28:50 +0000",
      "short_description": "teaser_9",
      "listing_path": "program-path-9",
      "currency": "USD",
      "catalog": {
        "id": 10,
        "name": "Domain Account 10"
      },
      "type": "Program",
      "title": "Program 9",
      "list_order": null,
      "waitlist": false,
      "sequential": true,
      "requirements": [
        {
          "id": 11,
          "type": "Program",
          "title": "Program 10",
          "requirements": [
            {
              "id": 13,
              "type": "Course",
              "title": "Course 12",
              "canvas_course": {
                "id": 8
              }
            }
          ]
        },
        {
          "id": 12,
          "type": "Program",
          "title": "Program 11",
          "requirements": [
            {
              "id": 14,
              "type": "Course",
              "title": "Course 13",
              "canvas_course": {
                "id": 9
              }
            },
            {
              "id": 15,
              "type": "Course",
              "title": "Course 14",
              "canvas_course": {
                "id": 10
              }
            }
          ]
        }
      ]
    },
    {
      "id": 11,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_10",
      "enrollment_fee": "0.0",
      "created_at": "2016/03/10 20:28:50 +0000",
      "credits": "3.0",
      "updated_at": "2016/03/10 20:28:50 +0000",
      "short_description": "teaser_10",
      "listing_path": "program-path-10",
      "currency": "USD",
      "catalog": {
        "id": 10,
        "name": "Domain Account 10"
      },
      "type": "Program",
      "title": "Program 10",
      "list_order": null,
      "waitlist": false,
      "sequential": true,
      "requirements": [
        {
          "id": 13,
          "type": "Course",
          "title": "Course 12",
          "canvas_course": {
            "id": 8
          }
        }
      ]
    },
    {
      "id": 12,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_11",
      "enrollment_fee": "0.0",
      "created_at": "2016/03/10 20:28:50 +0000",
      "credits": "6.0",
      "updated_at": "2016/03/10 20:28:50 +0000",
      "short_description": "teaser_11",
      "listing_path": "program-path-11",
      "currency": "USD",
      "catalog": {
        "id": 10,
        "name": "Domain Account 10"
      },
      "type": "Program",
      "title": "Program 11",
      "list_order": null,
      "waitlist": false,
      "sequential": true,
      "requirements": [
        {
          "id": 14,
          "type": "Course",
          "title": "Course 13",
          "canvas_course": {
            "id": 9
          }
        },
        {
          "id": 15,
          "type": "Course",
          "title": "Course 14",
          "canvas_course": {
            "id": 10
          }
        }
      ]
    }
  ]
}

Updating a program

Endpoint

PUT https://www.my-catalog.edu/api/v1/programs/:id

Parameters

Name Description Type
program[title] Listing title String
program[description] Full listing description String
program[path] Path to the listing. Used in URLs String
program[teaser] A shorter description of the listing String
program[enrollment_open] Indicates if the listing is current accepting new students Boolean
program[visibility] Indicates if the listing is visible in the web UI. Possible values: listed, unlisted, hidden String
program[enrollment_cap] A limit for the total number of enrollments Integer
program[enrollment_fee] Enrollment fee Decimal
program[days_to_complete] The number of days a student has to complete the requirements Integer
program[account_id] The id of the account to associate the listing to. Can be an id of any subcatalog of the catalog making the API request. Defaults to the catalog making the API request. Integer
program[list_order] Order in which the listing is shown in the catalog Integer
program[waitlist] Waitlist enabled (defaults to false) Boolean
program[requirement_ids] Ordered array of listing IDs that represent requirements for completing the program Array
program[sequential] Indicates if students are required to complete requirements in order Boolean

Request

Route

PUT https://www.my-catalog.edu/api/v1/programs/22

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "program": {
    "title": "Program 1",
    "description": "This is a very awesome program.",
    "path": "program-1",
    "teaser": "This is an example teaser",
    "enrollment_open": true,
    "visibility": "listed",
    "enrollment_cap": 150,
    "waitlist": true,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "requirement_ids": [

    ],
    "sequential": true
  }
}

Response

Simulated Response

Status

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: vc2h+0j/9eAzx8hrEBGMRm8DE/cFVfyGzzbkhJdDF965tuQ56wz/ZUgm2ZAxHCkjJa7Uc39v7qo72qD6tt0ksA==
Cache-Control: no-cache
Set-Cookie: _gallery_session=bllQM2FBVW1wajcwd0I1dzZDc0h1bU56aTBxODhEVUxFR1RnNGNvMFRod1pWdlh4MVBNUnBHd3l1c214Y1FlbURGM2N2KzR1SWNDNlh2bkR0UU1SOWxKdzVKMytDR1JvU0hTVGpiTUQ3SHlTdzNFRm9SUzBCajYxS1RraFljMlFVdU5oUGIrcXhvWXFUNnA1emY0Vk5xV3JvdytvZ1g1UU0velc1bWJxZEMwb25wOU8zYW1hckpBd3BiTE9qdEw1LS1YcVhGZ0pnSGZDRUwxckJMVXllcFFRPT0%3D--57affdafdffc2773ff95f60ace88534cc53689cb; path=/; HttpOnly
X-Request-Id: 77b8bbd4-f70f-4544-adea-fa0937bdbed3
X-Runtime: 0.035069

User registrations

Getting a specific user registration

Endpoint

GET https://www.my-catalog.edu/api/v1/user_registrations/:id

Parameters

Name Description
id Canvas user ID

Request

Route

GET https://www.my-catalog.edu/api/v1/user_registrations/1

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
canvas_user_id Canvas user ID Integer
name Full name String
email E-mail address String
custom_fields Custom field values, e.g. { 'phone': '(999) 123-4567' } Object
created_at Date/time registration was recorded Datetime
updated_at Date/time last updated Datetime
catalog[id] Id for the catalog this user registered for Integer
catalog[name] Name for the catalog this user registered for String

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: KcWw5DU0XkchAa3reIyuvaOaxLFlOrISnLAF9EZ9PlX43oHvihN/JmAdVNMXzT4oQzW6V9Hva6ayKCF7GPRuaA==
Content-Type: application/json; charset=utf-8
ETag: W/"c0163c9d4e2be5e9adfbf7de63e45fc6"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=VXB0ek96enVqMms0VmlOdERJY1RKTXI3bHlLNXFBekh5Q2NXMGNURjRxc3c5VUxmc1pkOFluT0xCZU53WEZWZ3RTQlliaW5rUVp6a2QvdjNINW1OL3JKVVAxZDBBazdNYmNSV2lvblNzdktUalhtS0c2NU9oY05OdThHTTliRkgycDl5b2h0TjVFbG1wUDhBM0RobzZnQXZub1kxRWxTQ0MyekFKUDZtanEvbksySnVzbjFhb3R2SzMyMGovN0ZlLS03SUpoUUp0aUN6Qnh6TmovRkFYRVZBPT0%3D--07c9da2c6c3f30cbee7fc36e90633747409b7624; path=/; HttpOnly
X-Request-Id: 13f1b54c-ad04-46b1-9c88-359eac7f0d92
X-Runtime: 0.040369
Content-Length: 293

Body

{
  "user_registration": {
    "canvas_user_id": 1,
    "catalog": {
      "id": 22,
      "name": "Domain Account 22"
    },
    "name": "User 1",
    "email": "user1@example.com",
    "custom_fields": {
      "favorite_color": "#BADA55",
      "code_of_conduct": "1",
      "age": "19"
    },
    "created_at": "2016/02/12 15:08:06 +0000",
    "updated_at": "2016/02/12 15:08:06 +0000"
  }
}

Listing user registrations

Endpoint

GET https://www.my-catalog.edu/api/v1/user_registrations

Parameters

Name Description
from Earliest date/time to return (optional, String). Suggested format YYYY-MM-DDTHH:MM:SSZ, e.g. 2018-01-01T00:00:00Z. System time zone is UTC.
to Latest date/time to return (optional, String). See 'from' above for format.

Request

Route

GET https://www.my-catalog.edu/api/v1/user_registrations

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: 510ASy2z7S/vsClCbc2v+mIdxYzK0r3OJ31GtCDzgPsCeM+j3NgI9pbMb+lRzd4BOfWyQytvzAiykCxvHA0dtw==
Content-Type: application/json; charset=utf-8
ETag: W/"8b782dc75975c89acba46e0f3c163cf3"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=Q0lCN3QxdTlFYTQ1OEkyc21ESEZ6c01xZ0s3UEN3ZEVlbUJNbWZKRXZ2VGY5cDVEOGpWNjZhQkZ5L0lFOFMxNFp6RDNWRVJhZU9WL09BcURmS0dmcjhnVWdtdkM2OVB3QWgzTnhBR2dUOGVxS1BVWmpUR1RDQWlpNDlHVGoyajlrVTVwVzc2MDNLaW44eC9vdUxrSGVZRVI4SFpKZExxR0Z0SWY5YXJTQ1NCZGRsOS9BcDdZTVRtNDZrU1FjUEJnLS1RMHI0QVBkaFpMRGNVZU5FUWxmZWJnPT0%3D--9d96420d0338bdfb89b1d98520a6ffaf184c03b2; path=/; HttpOnly
X-Request-Id: 69462532-5922-48cf-ba63-5ba307fe64f8
X-Runtime: 0.034213
Content-Length: 296

Body

{
  "user_registrations": [
    {
      "canvas_user_id": 2,
      "catalog": {
        "id": 23,
        "name": "Domain Account 23"
      },
      "name": "User 2",
      "email": "user2@example.com",
      "custom_fields": {
        "favorite_color": "#BADA55",
        "code_of_conduct": "1",
        "age": "19"
      },
      "created_at": "2016/02/12 15:08:06 +0000",
      "updated_at": "2016/02/12 15:08:06 +0000"
    }
  ]
}

Registering a user

Endpoint

POST https://www.my-catalog.edu/api/v1/user_registrations

Parameters

Name Description
name Full name
email E-mail address (will also serve as login)
catalog_id ID of subcatalog to associate with user (optional)
custom_fields Hash of custom field values, e.g. { 'phone': '867-5309' } (optional)

Request

Route

POST https://www.my-catalog.edu/api/v1/user_registrations

Headers

Authorization: Token token="my-token"
Content-Type: application/json
Host: www.my-catalog.edu
Cookie: 

Body

{
  "user_registration": {
    "name": "Barack Obama",
    "email": "barack@obama.com",
    "custom_fields": {
      "phone": "(999) 123-4567"
    }
  }
}

Response

Simulated Response

Response Fields

Name Description Type
canvas_user_id Canvas user ID Integer
name Full name String
email E-mail address String
custom_fields Custom field values, e.g. { 'phone': '(999) 123-4567' } Object
created_at Date/time registration was recorded Datetime
updated_at Date/time last updated Datetime
catalog[id] Id for the catalog this user registered for Integer
catalog[name] Name for the catalog this user registered for String

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: dQ8Inp4u+ImjIF81X687yKq4qGTTTYeXm1jo2IMqwGDxsMkljjYBcNC1sllWXf2OKhrc8SNJ5UgWgfbkEY6RqQ==
Content-Type: application/json; charset=utf-8
ETag: W/"027302ceec45df83355b719cb6d9a4c1"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=dWtlS1JCUTBTbmRQcnF6YWhLbkNTa1lleEpsSVZxb09mc055Z2FveXVSTGx4bjRuYmJjRG9hdFNUWWVtTW9zdUw5QzFjaTN0VXdScFJibFp5NTVHTytwNllScGJBU09kRVZsQVhrczdhVzNkR3QySHhFWjF1VWhhaDNMbjFHQUJQSnpUMFg2U2JPT3JNVWR5ZGJ2aGhaY1hxeTJpdVFWT01ZcXlCM2x3dHFtM1JGVjBDSnE1dnJ3dHRhendITVJ4LS03dktDTE5NSVlSOStpd3J1ZWVleC93PT0%3D--5ca4bae28f207c91a158e0b048954aa2ecd6208b; path=/; HttpOnly
X-Request-Id: c2b72f42-b9a4-4e3e-acc7-32f091cf9ef5
X-Runtime: 0.315136
Content-Length: 244

Body

{
  "user_registration": {
    "canvas_user_id": 1234,
    "catalog": {
      "id": 24,
      "name": "Domain Account 24"
    },
    "name": "Barack Obama",
    "email": "barack@obama.com",
    "custom_fields": null,
    "created_at": "2016/02/12 15:08:06 +0000",
    "updated_at": "2016/02/12 15:08:06 +0000"
  }
}

Waitlist applicants

Getting a specific applicant record

Endpoint

GET https://www.my-catalog.edu/api/v1/applicants/:id

Request

Route

GET https://www.my-catalog.edu/api/v1/applicants/1

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Response Fields

Name Description Type
id Identifier for this applicant Integer
listing[id] Identifier for listing Integer
listing[title] Listing title String
user[id] User ID Integer
user[name] Full name String
user[email] E-mail address String
status Status (waitlist, accepted, expired, or error) String
notified_of_opening_at Time user was notified of opening Datetime
created_at The creation date for the applicant Datetime
updated_at The last time the applicant was updated Datetime

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: eDh9B6aJsYe/KF7CnUbXMkeXgs8161lWvFbZKrZs3Cc+vWhmyq9f9lAjJohf2pSBxHWSc9UWyj9nx5NnFYQTTQ==
Content-Type: application/json; charset=utf-8
ETag: W/"e0b5c941a6bd48099ec8dfbc9fbbed00"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=Slp5dlc0NTliM2xqTDNOb1NyRG11YnZVb2FnSS9UUnMzZ2RZV3VBZDlNUzE2ZUpBUlBqOUJ3UzA3cVhvN0RaSCtieldUSlAzRkExeDkvZUxXWTY3UFdCblBTYlRjNnd0SVNpcFJ5S1lSV2lTS0hSZloyYVBSZjZ1dFlqdEIrUEQ2UGtmcFE2UTEwV1FRVUZPam5wQ2Q2eUswNzhOYytoZkxFdHhJN0VpTnRTTjQ0RUxhTE9ZZjRFdElDdDNzZkljLS1sNjAvb0ErNzhsSnRzeDdqblVSZ1hRPT0%3D--f6a6b9cf9228242d0ce4303fbda085dd6ff0d571; path=/; HttpOnly
X-Request-Id: 5c34f691-4cd9-46d9-8190-bced1e19f3c2
X-Runtime: 0.030682
Content-Length: 254

Body

{
  "applicant": {
    "id": 1,
    "user": {
      "id": 1,
      "name": "Applicant",
      "email": "plz@letmein.com"
    },
    "listing": {
      "id": 10,
      "title": "Course 9"
    },
    "notified_of_opening_at": null,
    "status": "waitlist",
    "created_at": "2015/08/18 19:55:05 +0000",
    "updated_at": "2015/08/18 19:55:05 +0000"
  }
}

Listing applicants

Endpoint

GET https://www.my-catalog.edu/api/v1/applicants

Parameters

Name Description
listing_id Only include applicants for the specified listing (optional, Integer)
status Only include applicants for the specified status (optional, String)

Request

Route

GET https://www.my-catalog.edu/api/v1/applicants

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Total: 1
Per-Page: 20
X-CSRF-Token: Qbf8wiZagXPIJg7DJP2gqgo2/NRrOCLYgMtIPfiAzrlzOW4Jia7XGA/SFSxSSkt8zEwRfjmcZjvr6XAMWIwK+w==
Content-Type: application/json; charset=utf-8
ETag: W/"071294dd9ada7252d5a6770b8d3e3083"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=WW00dElrQVlJN1BwNnRNVVdWdGxPRC9rU05GNEVVdnJlVHViZUswbEd3RHRta1RCcldTNk51dVk1QTFZQk51eVlNWGx0azBKK05kc2tOdEFzL2VrYnE4UTJicVJtVHlGeTBtRXRKUi9ldWxsay9vMTZZemtpUHVkblgvTW9OeW9TWkduTTMxRXUxS2s0ZE0xaDJTU0xzb1pvQUFON3lIYURVQXBzVXk2MURXeXFETEkvc0NyQUNOSmZXOTlWRFpGLS1qeVBSdGxFbE9OYUJIK0VMVXRRK0FnPT0%3D--6362a3d2ff2b49b679b2536ac9586cece0ff8460; path=/; HttpOnly
X-Request-Id: d6539654-8dd3-4059-a477-dae4f0d1ba8b
X-Runtime: 0.021737
Content-Length: 258

Body

{
  "applicants": [
    {
      "id": 2,
      "user": {
        "id": 2,
        "name": "Applicant",
        "email": "plz@letmein.com"
      },
      "listing": {
        "id": 11,
        "title": "Course 10"
      },
      "notified_of_opening_at": null,
      "status": "waitlist",
      "created_at": "2015/08/18 19:55:06 +0000",
      "updated_at": "2015/08/18 19:55:06 +0000"
    }
  ]
}