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.

Listing Image

If you are uploading a product image in SVG format. You will need to specify the file type.

curl https://www.my-catalog.edu/api/v1/products -F "course[listing_image]=@somefile.svg;type=image/svg+xml"'

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
settings[skus_enabled] Indicates if the course displays the sku field. Boolean

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 3vta4Tla5tcP1p3DPE1l381+oJTxgUq7mD+FKAlqkH/GkS9X9xUiSwGJ7ZUdI1ro/mU8Jd6xz21NCtRO2qPyBw==
ETag: W/"fb452a3b3488c812a8f321518dad1098"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=Z2VRZjRSd2x0bmtnbFI4SXM3MUtKOVlRK0xiazZwbENFTTRTbStJKytBZG1RWTlHa2ExaUpxSHZlS1pHTHgxTS9YVGZvYTZsbDNWR1kyMHJ5amhQbW00eTNKd3YrQ0FsZFl6QlhWZWZUemZnRmwxN295aWdMcGRIT1N4M0pzeHB5c0pkaEk5bVZrQmx5SHVkcnVXdU92c0FLREo2VHZJN0xiZ1IzRlJGUFZra2FDSlFQVDJ0RjlhcGMwUjY4ekg3LS1rOEVhNHZOQmFhRmY5UDhVaE9HQWh3PT0%3D--e38f0921d7839dec7b36abda11ea4a3ce8b27a21; path=/; HttpOnly
X-Request-Id: 8f7abe1d-7c14-4be5-b3be-f9047c68f6ec
X-Runtime: 0.046004
Content-Length: 1482

Body

{
  "catalogs": [
    {
      "id": 23,
      "name": "Domain Account 24",
      "parent": null,
      "created_at": "2020/01/02 22:12:16 +0000",
      "updated_at": "2020/01/02 22:12:16 +0000",
      "canvas_domain": "www.canvas-domain-24.com",
      "canvas_id": 24,
      "settings": {
        "privacy_policy_url": "https://www.instructure.com/policies/privacy/",
        "terms_url": "https://www.instructure.com/policies/acceptable-use",
        "currency": "USD",
        "time_zone": null,
        "country": "US",
        "email_from_name": "Canvas Catalog",
        "email_from_address": "notifications@instructure.com",
        "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_categories": false,
        "inherit_user_defined_fields": false,
        "beta_canvas_domain": null,
        "skus_enabled": false,
        "include_noncatalog_courses_in_dashboard": true,
        "external_idp_logout_workflow": false
      },
      "user_defined_fields": [
        {
          "list_order": 0,
          "name": "favorite_color",
          "label": "Favorite Color",
          "field_type": "text",
          "required": false,
          "required_message": "Favorite Color is required"
        },
        {
          "list_order": 1,
          "name": "code_of_conduct",
          "label": "Code of Conduct",
          "field_type": "checkbox",
          "required": true,
          "required_message": "You must accept the Code of Conduct."
        },
        {
          "list_order": 2,
          "name": "age",
          "label": "Age",
          "field_type": "text",
          "required": true,
          "required_message": "You must provide an Age."
        }
      ],
      "logo": "https://test-bucket.s3.amazonaws.com/test/logos/b4be6e3036189507a2720be53b8ab1625a82d061.jpeg",
      "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
days_to_expire Days until the certificate expires after it is awarded. Defaults to null. Must not be present when expires_at is present. Integer
expires_at Date of certificate expiration. Defaults to null. Must not be present when days_to_expire is present. Datetime

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": 1,
    "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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 0RhuSV4J04yQ+K0QiNyqGUwE9EksRbjnwplesa1iCQj+R27LkeFdJ63lS+vZsFcuYLVunvwI8bLqlFSeo6930Q==
ETag: W/"576fc328703373fb7b0fc36baff6025c"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=a0ozRG1UNHh0NlQ0MDVHNVZtUkN0VHliMTRuQStDMUpuaGdYRFhNSlhZQUNzclJMSzM2S2cxUW9YMjJoa2pML1VZdHFWYndwZzFkeDRjMzgyVDB4RjhvOC9YNkFsb2hNcGFCS29XcC9Zb0NQaFlQRnNkY0FGMWJSbUhxNzZmTjFLUFBrMVhTSE5DN0RxckVBN3RaRHNjMkY0S3Fxbks4K0N3eENDSW95TGNHVXUxSmVHVm43Tldmb0hwL3I3K0N0LS1CNjBqZGNzMTVwaStwMStnZ2xCN2hnPT0%3D--cde24d1b80bc55b7276cfb95169ba3346d3d52bb; path=/; HttpOnly
X-Request-Id: defa1a41-0f1d-4ac8-b177-630409cedb8d
X-Runtime: 1.674103
Content-Length: 297

Body

{
  "certificate": {
    "id": 1,
    "listing_id": 1,
    "name": "API Name",
    "active": true,
    "template": "<H1>This is a template</h1>",
    "pdf_settings": {
      "orientation": "Landscape"
    },
    "created_at": "2020/01/02 22:12:13 +0000",
    "updated_at": "2020/01/02 22:12:13 +0000",
    "days_to_expire": null,
    "expires_at": null
  }
}

Completed Certificates

listing a user's completions with a certificate

Endpoint

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

Parameters

Name Description Type
user_id required Canvas Id of the user Integer
only_certificates Indicates if the courses without certificates should be included, default is to include all courses Boolean

Request

Route

GET https://www.my-catalog.edu/api/v1/completed_certificates?user_id=1&only_certificates=true

Headers

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

Query Parameters

user_id=1
only_certificates=true

Response

Simulated Response

Response Fields

Name Description Type
canvas_course_id Canvas Course ID Integer
catalog_title catalog course title String
canvas_course_name Canvas Course name String
certificate_url URL for Course Certificate String
canvas_course_workflow_state Canvas Course Workflow State String
completed_at Canvas Course Completion Date Datetime

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-CSRF-Token: G2G/ou2xuvHrGqlFvUBfllxkmMqu6Bxmy3pAORIAgxnGRZZxdw3u5vzNWk+BkaIPZJYS355naL/gFqL4RycXkg==
ETag: W/"56571a7f2975aba1cfa8de45bedd0a0f"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=aUNTVDdaQXFVMjkwcWF5UlI4QWFDU2xTc2xmTXUxQ290RUEyblZyS1k4N28rcjZiZ3Fna2NDdEVuOG1lN0N3eVhyYi90NWlNVHNjeGZSQWlhSm5KRzQ4NEdGckFHUWNwQm1wUGhUU1kxa3ZkQ3dmWk9nQ3pHMkNjZS9qQ0VwUkpnZnd1d25ObFRVaVRZa2NMZFNmTU4zTUgzOWZZNm1EYkx5TUpMdElCZ01WWnh1cDJBMGlQVXhod0lQQzFxUy9XLS1sdEl5OEpOWmQzbEVlOTlydEhSeFRnPT0%3D--fc3dfc3ef5f7b229451da2f8af616c522798995a; path=/; HttpOnly
X-Request-Id: f81e9235-e91d-46e7-886c-e06a4b7a33f6
X-Runtime: 0.164725
Content-Length: 259

Body

{
  "completed_certificates": [
    {
      "canvas_course_id": 5,
      "catalog_title": "Course 6",
      "canvas_course_name": "Course 6",
      "certificate_url": "https://www.domain-13.com/certificates/certificate-numero-1-2.pdf",
      "canvas_course_workflow_state": "available",
      "completed_at": null
    }
  ]
}

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[allowed_payment_types] Allowed payment methods Array
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[waitlist_cap] Wait List Limit for the total number of wait listed enrollments Integer
course[listing_image] URL or file upload for the image to be shown with this listing. String
course[canvas_course_id] required Id of the related canvas course Integer
course[credits] Credit value of the course Decimal
sku Listing SKU for a course String

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,
    "waitlist_cap": 25,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "credits": 4,
    "sku": "abc1234"
  }
}

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
waitlist_cap Wait List Limit for the total number of wait listed enrollments Integer
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
sku Listing SKU for a course String

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/1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: lZqSiAhW86njVvNeRSxtYNsB1YLTy2YaWryE2p3FXUstRTywiydqXwWbdW7IImG5RHxSNBSyWvgPgQf9Th4EKA==
ETag: W/"7bc68f40debcf4c44f27e26d7ec5ccb1"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=L1hJVzJCU3FFYTE5RUtaTE8xUHMydnVneEJaZTdodzE1VjNpWklDZWhXV1VMSXVXME9CbFB1UDhFQWxtUTdkZ21COEdRTEpaLzRKK1hLVGVFbUsrY1RTdEFhdk1HYU9KUHBmbkhEbHQvT3dJdE5KYkFLVW04YnBwbG8xeXlCeUJUUEdpbkFtL2s0eU9XR3hZS1hrTHgxL2w3VUJ6WjVDcHBoOXRyVjM4L3FzWWJybmNYWjNLRU9Xc0EwclZTdngzLS0weWtDUDRQRzRidmVkTm53NmdrS0NnPT0%3D--63561c63b8827a80d1428cf87fffd3ad313b8df8; path=/; HttpOnly
X-Request-Id: 12099434-4d6e-4f59-b811-2f0a8ed677e5
X-Runtime: 0.164730
Content-Length: 631

Body

{
  "course": {
    "id": 1,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": 150,
    "description": "This is a very important course.",
    "enrollment_fee": "49.99",
    "created_at": "2020/02/11 20:07:18 +0000",
    "credits": "4.0",
    "updated_at": "2020/02/11 20:07:18 +0000",
    "short_description": "This is an example teaser",
    "listing_path": "course-1",
    "listing_image": null,
    "currency": "USD",
    "catalog": {
      "id": 2,
      "name": "Domain Account 2"
    },
    "type": "Course",
    "title": "Course 1",
    "list_order": 123,
    "waitlist": true,
    "waitlist_cap": 25,
    "sku": "abc1234",
    "show_free_banner": true,
    "image_alt_text": null,
    "allowed_payment_types": [
      "standard"
    ],
    "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/4

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: MVT7iXJGux7MHTnvotsZcKKok5mMUHHo4OH3BbufqncIMKLYllIjalzd2njmWebM0isQ5fWtRouJUdjxNN7g6Q==
Cache-Control: no-cache
Set-Cookie: _gallery_session=ZlFuUUJTc0w2QkU1VW9Temc1cnc5VXF1VmhqMEU5YWhiS2tBZm1aeFRlR0RheG00WmRNK3ZzSFVNWUJxQUlUVk82UTJhaW5Obkt5TU1adWdkUzRzeUFUMEFFSklrQ0tVd1ljQ0tqa3BYNjlPLzZzNm1XUUhDZlZhNU1zbTkyNE95N0phYW8wamFnUkZlZnNNSUNiaS9WV2pXRUcrWk9pWG15VmJTNnlDVTdEQUlONTNaODJaRnNWWEJWdmZaV1FnLS0rZWhrQ2ozVVpoZFp0SmNUbVRKUkVRPT0%3D--565d2bf0b2c30cd0cb866b5027a3c6b6529882d7; path=/; HttpOnly
X-Request-Id: 55d2bc27-137d-4938-bc18-1f9a29243468
X-Runtime: 0.078566

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/3

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
waitlist_cap Wait List Limit for the total number of wait listed enrollments Integer
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
sku Listing SKU for a course String

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-CSRF-Token: Zios4KTiY/rqki8Z5SiVHr5qfVBNSVpWbu/ZSDffx1lC98ePTSn2KWjuxCYCPhyJlGe969VHdqKaV+5ix2JY+Q==
ETag: W/"e2314d582861789fb20da4ce24323e4b"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=Y3J6bnViUWtxRXdvOFd4M0c5T2VjRUw3ZmpqK1hCMVZOMjZRMVU1ajViTElFSHdCTHZhTE96ejNsSFVhT0hnK0lvM0lTYVJLWXQwTmVBVEIxbEFWcEVpOTRIM0tyMldwVit1cXBpVFdiSmRLSUdOTUthQ050OFZmcTNtcjNIRkZwS3NxalRhdEpzMW1qZ3MyQUZrQ1NQblpVdHNFVGczanA5cC9DSkFDbTlQT1pnbm1uN0xWbVk3RG0vZ28xMlRkLS1sSlBHeHJGMm1mbVEvbEw5TTE0ejR3PT0%3D--f2e3d6c44f6a5bf112a74118094f1d8de3d6a8b3; path=/; HttpOnly
X-Request-Id: d0711f76-fb63-46cd-a3c3-be88595e9d98
X-Runtime: 0.053656
Content-Length: 594

Body

{
  "course": {
    "id": 3,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": null,
    "description": "description_2",
    "enrollment_fee": "0.0",
    "created_at": "2020/02/11 20:07:18 +0000",
    "credits": "3.0",
    "updated_at": "2020/02/11 20:07:18 +0000",
    "short_description": "teaser_2",
    "listing_path": "course-path-2",
    "listing_image": null,
    "currency": "USD",
    "catalog": {
      "id": 4,
      "name": "Domain Account 4"
    },
    "type": "Course",
    "title": "Course 2",
    "list_order": null,
    "waitlist": false,
    "waitlist_cap": null,
    "sku": "sku_2",
    "show_free_banner": true,
    "image_alt_text": null,
    "allowed_payment_types": [
      "standard"
    ],
    "canvas_course": {
      "id": 2
    }
  }
}

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
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 4La7qRByDNEjIqUtiJjMVckX/2O8RyrfJ8fdmdDM5y6RaUxCoBKUcjRtam8+u6/PZdCPGBWLlTNEorIhnakkqw==
ETag: W/"ebd75d53d36fd118e368e45166eaf909"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=cERybnpjRlhOSjA4MG9QeUg3RHpzWmJJTWhOLzVmV3czRzRKYjU5UTRZZU5tdERhTWVEb0lBVHRoL1N0SEpCbHY0Z0NkM0pHUStHWklCajU3VEwyNFF0dytNS3k5amY2Z0IyQXA2UEZXeW5KUEIyeDUzeWFIb2d4RE9MbTcxdnRDbUdEeURiYzJGb2JhTE1Id0VYeFE1Z1Y4TThtb2I2ckcxdTk4aEpWYkk0UVVuTVlnc2trSHV2NjdqS2ZBcHB5LS1yVXBPcHlZLzYrdjl6cEtvWVNBMmZRPT0%3D--2cc5a50f5e3202a9988262398084903e4a412462; path=/; HttpOnly
X-Request-Id: dd6f4223-7a97-41ca-9ef4-976e43904711
X-Runtime: 0.068579
Content-Length: 597

Body

{
  "courses": [
    {
      "id": 4,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_3",
      "enrollment_fee": "0.0",
      "created_at": "2020/02/11 20:07:19 +0000",
      "credits": "3.0",
      "updated_at": "2020/02/11 20:07:19 +0000",
      "short_description": "teaser_3",
      "listing_path": "course-path-3",
      "listing_image": null,
      "currency": "USD",
      "catalog": {
        "id": 5,
        "name": "Domain Account 5"
      },
      "type": "Course",
      "title": "Course 3",
      "list_order": null,
      "waitlist": false,
      "waitlist_cap": null,
      "sku": "sku_3",
      "show_free_banner": true,
      "image_alt_text": null,
      "allowed_payment_types": [
        "standard"
      ],
      "canvas_course": {
        "id": 3
      }
    }
  ]
}

Updating Course SKUs

Endpoint

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

Parameters

Name Description type
attachment required CSV containing a Catalog Course ID and Catalog Course SKU header file

Request

Route

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

Headers

Authorization: Token token="my-token"
Content-Type: multipart/form-data; boundary=----------XnJLe9ZIbbGUYtzPQJ16u1
Host: www.my-catalog.edu
Cookie: 

Body

------------XnJLe9ZIbbGUYtzPQJ16u1
Content-Disposition: form-data; name="attachment"; filename="missing_header1.csv"
Content-Type: text/plain
Content-Length: 69

[uploaded data]
------------XnJLe9ZIbbGUYtzPQJ16u1--

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-CSRF-Token: t5yIIoSurLn3mwzMbqAv8IioEPgFmYEQ+MoitXSGoTh4bXcAfOl5r9cjrN1F7nD0gpAfKkKMuU+DBxq9fnsoUg==
ETag: W/"8c403095e07556a1ebff0ef3c79db89d"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=NVBnajJNZUs0RjBSU3BJb05ENkd0Q2MvcCtsN3hpSFNZVisyMno0aTI1eFV5TlU3am9NQzFNUnBGT3ZhdmV2WEI4NXpMTGxrZkdyb1YwTDFzMTdkZ1U3L3A1L091cFNIbzRjTHdEdUtjRXdWRG4vNTlLT0xnVHZKQ0x4dTh5RFRMd3RSNVE3YTZIWjNRc1B4VEd1bVpnd3pIS1luQStPQ1p6T3dFTUpmY3RSNVdBNVV6emdhRG1HMXBkREZ5aUxkLS1samoyci9UOFlhSmc2T3llbExvd013PT0%3D--72dfb0771089ef35ec74cd940822ec4d52ad906d; path=/; HttpOnly
X-Request-Id: f106b4e5-7647-4d22-95d5-d585fd815e42
X-Runtime: 0.058507
Content-Length: 205

Body

{
  "progress": {
    "id": 1,
    "account_id": 3,
    "canvas_user_id": null,
    "completion_percent": null,
    "workflow_state": "queued",
    "payload": {
    },
    "created_at": "2020/01/02 22:12:13 +0000",
    "updated_at": "2020/01/02 22:12:13 +0000"
  }
}

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[allowed_payment_types] Allowed payment methods Array
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[waitlist_cap] Wait List Limit for the total number of wait listed enrollments Integer
course[listing_image] URL or file upload for the image to be shown with this listing. String
course[canvas_course_id] Id of the related canvas course Integer
course[credits] Credit value of the course Decimal
sku Listing SKU for a course String

Request

Route

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

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,
    "waitlist_cap": 25,
    "enrollment_fee": 49.99,
    "days_to_complete": 45,
    "list_order": 123,
    "credits": 4,
    "sku": "abc1234"
  }
}

Response

Simulated Response

Status

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: lnUX9RiYfWUNQqw00kTDn/TSMtWUeY+lTxbfESsFMioh8zVpH42XOW1axng+Pgi18J2S/xhoCWEtQTBnxdgpFA==
Cache-Control: no-cache
Set-Cookie: _gallery_session=UEdoT0RrNDJyc1NWNGdrSStXTGxDOElzVGdVVWxjd2o1Q2ZYMlBaM1NsdUNmekw5cXVrMTVZQVVWSkUzeWk1OXlVOWIvb2k4Y3V0bE1jOXBGRVBYL1NReVJ6Y3pZYmN0ejNGOVVIZmY5ZTNMQ2l4aEZqZzVnaVQ0d2QwRS9EUEk5Y2hnUWwvdjlRWHNJcHV3MEpveW00RmhiQ3NEY1FNcEFzRUdIZmowQ1FxTnJ4eVBMYzZycXg0YzBOYVpDSjNWLS1CblpQT00zVDRyNitQKytvZERsVkFnPT0%3D--22aeb5ff2fd92d93254d74fd27c1f914b7e45876; path=/; HttpOnly
X-Request-Id: 46cd88b8-af30-4ed3-9f09-2ec5fa230a96
X-Runtime: 0.094880

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": 32,
    "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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: l0uKJFtbpw2FMmA4VYYADO4MJlcbx+sKDzwp4+UA3NR9ADyI+FXh4dzAzmFeTDLW5hcqPJAiQi4CZbA7KLP/SQ==
ETag: W/"53dae51d7b1a600774180974fbb1f5a5"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=QlZaUzRDK0ZMVTRBS2xBUXFtYzV4Ylp5Ny9EUWRVb3Q1ekEza0hjdFQ3cmp2d0NSdTB6TXF4UmpoM29saXV1SFg0WVBRanBrLzZVN0NpMVRRWXBUbzgxQUdNSkZydHp6WDhzazJsK0dLajd2NEx3YzRKSkwzOGgyMVVheVcwZ3oyNnZPZHNudGlvd2VGZ2pMSmxQdUdQYWRuTEVtNXFCUlZOME5ZdHd3V3Y5VEdkTkV4eVlML1A4SjJvclAyRkk2LS1sWExWZldsaFBCRGdoRC9BbjhxYSt3PT0%3D--ad94736c07236947438fc08e907f6e7b98dbc326; path=/; HttpOnly
X-Request-Id: bfc027cf-a381-49bd-a505-54782a197fb6
X-Runtime: 0.075357
Content-Length: 177

Body

{
  "enrollment": {
    "id": 2,
    "user": {
      "id": 1
    },
    "listing": {
      "id": 32,
      "title": "Course 30",
      "type": "Course",
      "canvas_course_id": 19
    },
    "enrolled_at": "2020/01/02 22:12:16 +0000",
    "status": "active"
  }
}

Deleting an enrollment

An additional request must be made to Canvas to delete the enrollment and remove it from the Catalog Student Dashboard

Endpoint

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

Request

Route

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

Headers

Authorization: Token token="my-token"
Host: www.my-catalog.edu
Content-Type: application/x-www-form-urlencoded
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

204

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-CSRF-Token: +gRPubuDmQoV9jIvcPZvm5avpz8pGuQ5mw1QTAFfG6X/b5a1Xb9Wxkw8jDx53pv5ockgJuWL0f3+DN18EE8zrA==
Cache-Control: no-cache
Set-Cookie: _gallery_session=SSs1eDViV2ozVVdQeFp1TDdTeHd2TDVNaDN2bHhzbEJkOW5lUWdwa2ZwTTlTUTlCTlIyUi9JUXFFYXRRMklMTzlXbzliVmlhVVduTUJmYzEzQytmbnNLbXE5OFlFVXZ0VnFFVlZadEYwNlpDdjdMaUg1VVcwWFI0a2dHSDM5amNqQk9laHZIQmt4YlcvOEQzSW9aWmhmYzN6L3N3RHptaG04TWIvbjMzWnNYWWVmTjhRNjFraTRLeWpIU0NDMmlILS1iVk9PM2R3cVIwMHRZNzNzejN2RFpRPT0%3D--08b3ea3b0715de3ecc8ac741f3214b52d46e442d; path=/; HttpOnly
X-Request-Id: 0fa4b27b-e8a4-4603-994b-56c27f01fdde
X-Runtime: 0.040082

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/3

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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 2ChgDkZPOpYeSwlNJCSgOorkfm54Q0UrYEZS1LBa0178ljWXC6YU1yWhYmWad6VGW7sXqtDXDqMU72J5nLmP2w==
ETag: W/"4c19819fb3f82cc8ccd5872800137c46"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=N2NNS1R0eXJQWEZsR0NETnUvYStlODlGa096NThKZDBsVmdQSHRERURUY3E0L3p5Nkp3a0J0RFV4MURNL2R3SG9pL1hZWmRRajZsd2oreFM4V2pVb2pwV2xqb2FYTDRJaVRnSHJudHdBR3F1WWM1MDQ4OGg4aC9hWE1Ja2dvK2hJOXpPaDFTMFBDb2F4eDJObWhwSTBoRTc1WFlyL3Urd0VVSklxdDZ6M1BnNEE0akRzS3BjMGpvWWdSV3FyOGV6LS1QNTVhRWZuU0JVbnI3WW9VVEdRN1lnPT0%3D--a8d0b2d8ab4e0206d60f56fcf82f388817d0ad56; path=/; HttpOnly
X-Request-Id: a746c853-3a94-4cc6-8c41-769fa2d3d834
X-Runtime: 0.048262
Content-Length: 177

Body

{
  "enrollment": {
    "id": 3,
    "user": {
      "id": 1
    },
    "listing": {
      "id": 33,
      "title": "Course 31",
      "type": "Course",
      "canvas_course_id": 20
    },
    "enrolled_at": "2020/01/02 22:12:16 +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
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 0+/eEEILlLkMseZXcqQHcNuUIoKySP5hzagWPpf/BQA9XxIsRQUYUhgI0VJUQkUkLFTmJW6CPd+XMXytCBBSPQ==
ETag: W/"846e88f3917162ceb516d57d10225139"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=YUZxVGV2dnViT3NYMlpiYWIyb2tUemlLREQ0WXZsOTBHMFIzNzJIMDRpUHE1dWxXT1AxL2VobXpNSjhNQXFhVFVQRXhpRm55eFpJeUM3RGU3Wkw1TDRPeDBkNmZFK05oOC8xTlBSQTU2QnRpeXczQ25jTUphaUN2ZEY0UFB0cEVzTjlhTksxTkRaZ2tHZG40dTFZZGgvT2NBbVRQLzhDbU9QTkJEaUp6YnZpRERKVnA3eTRIblVFc1BweUg2d1JMLS1rRUxIK2xjSG1hSExjbWx0dGQvNmNRPT0%3D--6339bc4af4d5399d123b516a812c1313e3d0093a; path=/; HttpOnly
X-Request-Id: 149fefdb-f097-4fdd-93a0-7d50908a9389
X-Runtime: 0.041183
Content-Length: 180

Body

{
  "enrollments": [
    {
      "id": 5,
      "user": {
        "id": 3
      },
      "listing": {
        "id": 35,
        "title": "Course 33",
        "type": "Course",
        "canvas_course_id": 22
      },
      "enrolled_at": "2020/01/02 22:12:17 +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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: IsmZ+wl3nVP6KNVDgfhMMd96RQlPiFC6WIxXfm1nPly2QKC7ZRMrxtH4pI9myfiJVYqrJ4ovPozMok7NsJdN7w==
ETag: W/"f7d6c99bcce5ce16c6202b170844a812"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=VURSZDRMcUUxVlExN2w5cjMrL3dZc0VObFE4cklkOHJhaURLQWllclRDaWhSM20zNnd3TUtkQ0R5eXBlb0lEdnBoM0NtemtyZzBzMnJtcEg0TGtva043NXl2K1c4R29mKzhSSk9MVFk2L1djMldBSXNGRS9sd0k2VEMxbjREcGViSHZwUUhROFVtU0VzQXFCM09XY1FjOU1vM21kZ0FReGNSUnMwaVNtUWhKbFJjenpqSjBJZm12SHdGeTFlZXpNLS05WFpoTjczQTV4OWJKaGhjamFVd1FnPT0%3D--15f8d4a5d80718056ef47b639f5c06018718f795; path=/; HttpOnly
X-Request-Id: 06bac099-432b-424e-bdb0-e2ed215b1850
X-Runtime: 0.053645
Content-Length: 487

Body

{
  "order": {
    "id": 1,
    "full_id": "1",
    "catalog_id": 16,
    "catalog": {
      "id": 16,
      "name": "Domain Account 17"
    },
    "user": {
      "id": 1,
      "name": "Saul Goodman",
      "email": "bettercall@saul.com"
    },
    "listings": [
      {
        "id": 10,
        "canvas_course_id": 8,
        "title": "Course 9",
        "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": "2020/01/02 22:12:15 +0000",
    "created_at": "2020/01/02 22:12:15 +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
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: xjOPoQx7+oqDMfxZweFW0UAtjq3g6ZJHSmom7od6XKnnZoVHe5n82RxrQ7WUY40A4nkVdVaq3SsWrBt8hrf6eg==
ETag: W/"c4aff7fce3dbae1f892ce88fd26ec0c6"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=SkUzNzYyd28wWFhBU0Vpc2djeWlZOXd3RXdqQmNlM2Q5M0lBVWVWcDRoSnR2a2NwQzFhRFM2clYxMEdrdlR5c2w1elVoMDkzUFpHUjEzcEw1T1FWT0FBN3hJMTZKZ2Q1aWU2WE9ZVmI2cFRUUkg4WWNZMVdCSEVEOXV6NlBYQWY4UERaSkVQTWM0QzNxYWpRcW1BdllTWEtWK2JwRVh6dGhiWDNZMnEvbzhCR21wd0RKTnhCU3FNa0V3UGxDU3Y0LS1pcFZaYi8zNlZZaVArbURTZlZtMmlnPT0%3D--a812568d0fa731dced71bf108c4b49f3c7faa62d; path=/; HttpOnly
X-Request-Id: ae6b3a74-066b-4710-87ff-65e1b12d8c04
X-Runtime: 0.046359
Content-Length: 491

Body

{
  "orders": [
    {
      "id": 2,
      "full_id": "2",
      "catalog_id": 17,
      "catalog": {
        "id": 17,
        "name": "Domain Account 18"
      },
      "user": {
        "id": 1,
        "name": "Saul Goodman",
        "email": "bettercall@saul.com"
      },
      "listings": [
        {
          "id": 11,
          "canvas_course_id": 9,
          "title": "Course 10",
          "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": "2020/01/02 22:12:15 +0000",
      "created_at": "2020/01/02 22:12:15 +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[allowed_payment_types] Allowed payment methods Array
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[waitlist_cap] Wait List Limit for the total number of wait listed enrollments Integer
program[listing_image] URL or file upload for the image to be shown with this listing. String
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,
    "waitlist_cap": 12,
    "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
waitlist_cap Wait List Limit for the total number of wait listed enrollments Integer
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/6
Content-Type: application/json; charset=utf-8
X-CSRF-Token: HCDr/pxZtG+QMLYiflzs6Oq1uI+s4gylvN8Fj6hH1dW6eHiK/Sm3YoG9c0pbt0KRP55QZIYHktaefB130q/sPQ==
ETag: W/"4f53149de4ff1786ca4b1d4a39ed0b9e"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=MFF6ZVV0dzlzUWIrWUxDaGdWaDQxeFY2LzdtQm9HV3B1aWVCK3YzeTMrL2l4NEVNUDkvQmlrWitFU1JObGFzUU01SG95RlRlYlNJTlU2NWZBTjBSN2ZsNGh3SDlnK2dEUHRiekt1RHpOVjd6NVpJSlFtNGhmUnMzTXVBSXpxNkpRTlgwanFvVkUwQkdLd3hpMTBFZW9YSGtiNjZBcWJHbkwzTUJyckl2UGYvNVFNZ09pUkdUWmdNTklyZFo3VjRmLS1CWWQxb1BPOS9zV1F4dTE1RmQxU3FBPT0%3D--b9b3e85cd3a7fab5d43975bbcc03e07a1485564c; path=/; HttpOnly
X-Request-Id: dbd5dd57-b423-444c-b746-ed16f7667937
X-Runtime: 0.136645
Content-Length: 632

Body

{
  "program": {
    "id": 6,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": 150,
    "description": "This is a very awesome program.",
    "enrollment_fee": "49.99",
    "created_at": "2020/02/11 20:07:19 +0000",
    "credits": null,
    "updated_at": "2020/02/11 20:07:19 +0000",
    "short_description": "This is an example teaser",
    "listing_path": "program-1",
    "listing_image": null,
    "currency": "USD",
    "catalog": {
      "id": 8,
      "name": "Domain Account 9"
    },
    "type": "Program",
    "title": "Program 1",
    "list_order": 123,
    "waitlist": true,
    "waitlist_cap": 12,
    "sku": null,
    "show_free_banner": true,
    "image_alt_text": null,
    "allowed_payment_types": [
      "standard"
    ],
    "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/18

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: gAL/eLON2Cp+mHm3ZrhbMcUKni5URDO455X0V2vlelo+5lYn9bmjy9YVgyLY9vKQGVMR4IAU49qAxgvirHk/Rw==
Cache-Control: no-cache
Set-Cookie: _gallery_session=Q1FYKytENDAraWJLUDh3TnEyNXNVTHRCdU41RTlscVZxUGQvOTBTYkRUaXQ4VjJpYnZselJpbnJ4d3Arc3ZING1YK3prQk5HdW1MQnRiNE1sYkpvazhyTDB5YklobUdxcG9FOWwrNFIxYUozcThxd21RTzQ3dEJUbXVUaWs0TFpHd1R5N1g1L3lwL0JMNmdPa0ZMVjZtU2VyVEFFUmd6YnI3cGpVU0hldGRLUkhFRjIvcjArYTJjNmxTQXdSdGU5LS0rTzA1Qk1TN0QwekpHLyt1MGlxRTVnPT0%3D--6d2619d9996b654a02e299bdb2e57b795995aeb2; path=/; HttpOnly
X-Request-Id: fd1283e5-a9f5-47b3-b7c4-59c856e0d849
X-Runtime: 0.048085

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/20

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
waitlist_cap Wait List Limit for the total number of wait listed enrollments Integer
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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: qMGdcn+ojO7IQg+o9hE2bdel2Fng5/Y49ifjKmrXJyS3hKBrvdUg09tdDgEFp5VxmHty5bI5IyetoUab4M8InQ==
ETag: W/"09846b532e1f61d9876f0182fe064612"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=UmtGWlhPbzB1YkNHMDJzQ3M0alRlOTVXVkRlYjJydE9uQVpmU3dTV1Jpekg1MUdnc0I0cE5QOVpOQTV5ejVvK2VOTlJUMzlncjQyY1MrcFBwUlU5c2xDL2tDZWd2ajh5L1Vqc2F3d3dsckRDQzFIZDlWQXBRaHhkY25welViRnQxKytIVFIyVUhPL3pucGpYVEYyNkVUVEdGZVZxbW5Nbnl1ZzdNNzdvQXh0Z1hQdXhGdGtlOFF1REZ0SHFTbldKLS1HNVlVbi94ekROWHVhVm9WeDgzL2dBPT0%3D--9ce26843497367a1f9f95166fd9322c578454765; path=/; HttpOnly
X-Request-Id: 9030c6c3-0e23-4ad1-a777-c68590abac8f
X-Runtime: 0.123823
Content-Length: 958

Body

{
  "program": {
    "id": 20,
    "visibility": "listed",
    "enrollment_open": true,
    "enrollment_cap": null,
    "description": "description_18",
    "enrollment_fee": "0.0",
    "created_at": "2020/02/11 20:07:20 +0000",
    "credits": "9.0",
    "updated_at": "2020/02/11 20:07:20 +0000",
    "short_description": "teaser_18",
    "listing_path": "program-path-18",
    "listing_image": null,
    "currency": "USD",
    "catalog": {
      "id": 12,
      "name": "Domain Account 13"
    },
    "type": "Program",
    "title": "Program 18",
    "list_order": null,
    "waitlist": false,
    "waitlist_cap": null,
    "sku": null,
    "show_free_banner": true,
    "image_alt_text": null,
    "allowed_payment_types": [
      "standard"
    ],
    "sequential": true,
    "requirements": [
      {
        "id": 21,
        "type": "Program",
        "title": "Program 19",
        "requirements": [
          {
            "id": 23,
            "type": "Course",
            "title": "Course 21",
            "canvas_course": {
              "id": 11
            }
          }
        ]
      },
      {
        "id": 22,
        "type": "Program",
        "title": "Program 20",
        "requirements": [
          {
            "id": 24,
            "type": "Course",
            "title": "Course 22",
            "canvas_course": {
              "id": 12
            }
          },
          {
            "id": 25,
            "type": "Course",
            "title": "Course 23",
            "canvas_course": {
              "id": 13
            }
          }
        ]
      }
    ]
  }
}

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
Per-Page: 20
Total: 3
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 7ff9BWJSTOGXflL/zrrrOdia7fhacaOcw6ysxtmqD6jJr/qzPprLIvGhUHHYTx/MiTuXve4aM2rTuJ3rfQtcuA==
ETag: W/"7fc5940080a8c545cb7f21fb7934ed44"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=YnZWRHRCbTgrOHBFL3pCbS9TTEtVVk9YYW5FcE1pZEtvRjVrbXgzbmk1T1Y2N3p2TWdVbDZTUW9MbUM2NllVOW5GVUpvZ280WmFmUVhTYTZvMkQrYmhlMzVqMHZaUFRiSHVTVTh4VjBtb0tNZDJpSjcyOEZNMXpGR2M0blZJRS9seTI1aWc0MGtSTVcvZ0FobDkra011UUhpZWtXd0NiRXRpd1EzUEFUaHZhMHR5T3hSOFJ4bXA1V3VBMlFPUzlmLS1CWStEMVJ6STB2ZmNaZ1J0c0Y1Ykh3PT0%3D--d7cdbb69d0f72afab7516623aeedf07599a606ad; path=/; HttpOnly
X-Request-Id: 5010c7c9-dbfe-4167-a1c8-bed24d88c3ae
X-Runtime: 0.180904
Content-Length: 2375

Body

{
  "programs": [
    {
      "id": 14,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_12",
      "enrollment_fee": "0.0",
      "created_at": "2020/02/11 20:07:20 +0000",
      "credits": "9.0",
      "updated_at": "2020/02/11 20:07:20 +0000",
      "short_description": "teaser_12",
      "listing_path": "program-path-12",
      "listing_image": null,
      "currency": "USD",
      "catalog": {
        "id": 11,
        "name": "Domain Account 12"
      },
      "type": "Program",
      "title": "Program 12",
      "list_order": null,
      "waitlist": false,
      "waitlist_cap": null,
      "sku": null,
      "show_free_banner": true,
      "image_alt_text": null,
      "allowed_payment_types": [
        "standard"
      ],
      "sequential": true,
      "requirements": [
        {
          "id": 15,
          "type": "Program",
          "title": "Program 13",
          "requirements": [
            {
              "id": 17,
              "type": "Course",
              "title": "Course 15",
              "canvas_course": {
                "id": 8
              }
            }
          ]
        },
        {
          "id": 16,
          "type": "Program",
          "title": "Program 14",
          "requirements": [
            {
              "id": 18,
              "type": "Course",
              "title": "Course 16",
              "canvas_course": {
                "id": 9
              }
            },
            {
              "id": 19,
              "type": "Course",
              "title": "Course 17",
              "canvas_course": {
                "id": 10
              }
            }
          ]
        }
      ]
    },
    {
      "id": 15,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_13",
      "enrollment_fee": "0.0",
      "created_at": "2020/02/11 20:07:20 +0000",
      "credits": "3.0",
      "updated_at": "2020/02/11 20:07:20 +0000",
      "short_description": "teaser_13",
      "listing_path": "program-path-13",
      "listing_image": null,
      "currency": "USD",
      "catalog": {
        "id": 11,
        "name": "Domain Account 12"
      },
      "type": "Program",
      "title": "Program 13",
      "list_order": null,
      "waitlist": false,
      "waitlist_cap": null,
      "sku": null,
      "show_free_banner": true,
      "image_alt_text": null,
      "allowed_payment_types": [
        "standard"
      ],
      "sequential": true,
      "requirements": [
        {
          "id": 17,
          "type": "Course",
          "title": "Course 15",
          "canvas_course": {
            "id": 8
          }
        }
      ]
    },
    {
      "id": 16,
      "visibility": "listed",
      "enrollment_open": true,
      "enrollment_cap": null,
      "description": "description_14",
      "enrollment_fee": "0.0",
      "created_at": "2020/02/11 20:07:20 +0000",
      "credits": "6.0",
      "updated_at": "2020/02/11 20:07:20 +0000",
      "short_description": "teaser_14",
      "listing_path": "program-path-14",
      "listing_image": null,
      "currency": "USD",
      "catalog": {
        "id": 11,
        "name": "Domain Account 12"
      },
      "type": "Program",
      "title": "Program 14",
      "list_order": null,
      "waitlist": false,
      "waitlist_cap": null,
      "sku": null,
      "show_free_banner": true,
      "image_alt_text": null,
      "allowed_payment_types": [
        "standard"
      ],
      "sequential": true,
      "requirements": [
        {
          "id": 18,
          "type": "Course",
          "title": "Course 16",
          "canvas_course": {
            "id": 9
          }
        },
        {
          "id": 19,
          "type": "Course",
          "title": "Course 17",
          "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[allowed_payment_types] Allowed payment methods Array
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[waitlist_cap] Wait List Limit for the total number of wait listed enrollments Integer
program[listing_image] URL or file upload for the image to be shown with this listing. String
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/13

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,
    "waitlist_cap": 12,
    "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: ZmAUh26bOF2/UOD2JVMa0x4irSuOZc3AnGOaHqC1w4AbZkRH3dEMNWFrFvoX06vht1vrCUUUikO4KZSi2zjaOA==
Cache-Control: no-cache
Set-Cookie: _gallery_session=Q3RtY1piUEFMSXhaend5dGNIbWpqck9ZemdmU2d4WjBBTkVWY1ZGaGJlM092dS9QbFBYMDV6QTI3SExCei9ZaEhCK0gyY0JsT0hsbytGcE9QeW9vODVaYTB2NTN5bGhYYURNNHc5VzM2SzUyKzlIMHpPb0VFTytPVHh2dnNaeERPNWNtMk5idHI5dlM4emg2bmdwa0NyVzZmNXBSbnpBUzNZTjdaV1ZtUUE4bHBrQ3ExMm95d3AyQTJPNWdISm9NLS1xcFNxOGxoMlh0eHY4QkhsNlhzTDNnPT0%3D--9e4a2f4c6718e752523d37bc113e919904116be2; path=/; HttpOnly
X-Request-Id: bd801588-a6d2-47ce-9d9d-212be9f9419c
X-Runtime: 0.072811

Progresses

Getting a specific progress

Endpoint

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

Request

Route

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

Headers

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

Response

Simulated Response

Response Fields

Name Description Type
id Progress ID Integer
account_id Catalog Account ID Integer
canvas_user_id The Canvas User ID of the user who initiated the job Integer
completion_percent The completion percent of the job Integer
workflow_state The status of the progress String
payload Any data or errors returned by the job Array
created_at The creation date for the progress job Datetime
updated_at The last time the progress job was updated Datetime

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-CSRF-Token: JfWjNsaOLNGqjZt3A/1RFyCtVLtk8O5WsfBMkEr90QY/TQISm3/wyiFXUnhA9RXjtgXeoBqOZ4lSgtGv/uP7XQ==
ETag: W/"24a5863ed2047435abf4d4c7d53b780a"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=VXRTelFOYTFPMHVsaWdaRW5OSFYwYlMrTmNrMEpUVDgwK1g2YVhVbmh2SUZoS3BjT3lpaTRhNkNqc1pZRnViUGFxOG1DMFR6YzJRYkJTeVI3SFF6ZnlZYVNscitxejhnQS9LL2hRNnUvVEFpa1JiUlBQTGM2aWtsOEhlUldjSDV3a2dWbElqYkFaQ1JLQlZBWnZocFJxeTRTRGlMeDVjajRDblBwQUkvTEdwNVZVVGE0L0xSUm9CcGhXdzgvcmZuLS1SNGFTL1IxNVhiRDRKU0ZxNmgrcllBPT0%3D--46d87a6283450cd4fad79b04715b0a0064692d74; path=/; HttpOnly
X-Request-Id: 86577d43-154b-426d-9942-7c12ef8ca5a4
X-Runtime: 0.029666
Content-Length: 206

Body

{
  "progress": {
    "id": 2,
    "account_id": 11,
    "canvas_user_id": null,
    "completion_percent": null,
    "workflow_state": "queued",
    "payload": {
    },
    "created_at": "2020/01/02 22:12:14 +0000",
    "updated_at": "2020/01/02 22:12:14 +0000"
  }
}

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/3

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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 8Vu3sIibQkAGuGyuMBnVcvycvDyU9wudayW7o8EQXXMX9tHZOpadY7fHUaInWBtYgBJozeWA5YRRV4IsHzOMsA==
ETag: W/"dd7d9899b75c1d22fd006a5121d7ac49"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=aGVOM2tlZ2d4ZnRza0JhOTJ0b0NmdndtN1FUSGN3SHFJaUVjSUJtdGovOFJaaVRZalRoTi81RHA4ZndPS2sxcTdpdFlYMTZBM09YcnNSem1mUDNrOWMycXUydzlETVBoSDdodXltQlp6M3Z0SlU2bnZFVWlEQTZ5QkYxeDVKMHBiek1Id3hPdE1lNUtGWGU5amZDa05iUGtkUWtyZkFYUU9jNzVNWVYvNFVncmhXVkNPL1pMdnJHRzVacUV6djQ3LS16VFdUemFlRlNxYkJpZGF3NnZJVFZBPT0%3D--0a34bbfe3d4a1b4c4c95ab870e852ab82a7e5ed6; path=/; HttpOnly
X-Request-Id: fac8f05a-3d97-48c9-97e7-8e4d6b230abb
X-Runtime: 0.040218
Content-Length: 293

Body

{
  "user_registration": {
    "canvas_user_id": 3,
    "catalog": {
      "id": 10,
      "name": "Domain Account 11"
    },
    "name": "User 3",
    "email": "user3@example.com",
    "custom_fields": {
      "favorite_color": "#BADA55",
      "code_of_conduct": "1",
      "age": "19"
    },
    "created_at": "2020/01/02 22:12:14 +0000",
    "updated_at": "2020/01/02 22:12:14 +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
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: gPcYwlETGHJgkmOjVa4o757Z1kiRHYi4nm5pQkS2L/sAvdIjEwk8HdMg3+GQ0rGRmdKykUNs4AMXuVOYgCR0iQ==
ETag: W/"ffa5a8236fb9e62d25819bb9b37e7b2b"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=cW5MWTRtZURxZThsSVNvSlExSnY5TUNSQ1NjM3Z3c2p0Y21uVzhXcFY3OGoxYTM5bVNzYkI5WW9tN3pISU9ycXpsNTZwY01PUW1HZmlORVRjTDQ3bUxKUWE0dTVVWFN6NE1MTGxiR3M3enhQNHRjT3d4ajdraGZTVzFYYjlGd0VxNnUvZzRGcUthMmh6WSt5MUhJK0lESEZVS1NMNjUySkE5OUxsMmNXVGN3YTVEeFVDVDBDdGM3cE9GUHRQZ2lRLS1LbU5hcGs2SVJpTkFzSzNRRkgxZVhnPT0%3D--18a75b08ff7fd30b31c9d50fa8446717ad805c4b; path=/; HttpOnly
X-Request-Id: 1e8c31ad-7b97-453e-8ec1-cdf54cdefcda
X-Runtime: 0.056465
Content-Length: 294

Body

{
  "user_registrations": [
    {
      "canvas_user_id": 1,
      "catalog": {
        "id": 8,
        "name": "Domain Account 9"
      },
      "name": "User 1",
      "email": "user1@example.com",
      "custom_fields": {
        "favorite_color": "#BADA55",
        "code_of_conduct": "1",
        "age": "19"
      },
      "created_at": "2020/01/02 22:12:14 +0000",
      "updated_at": "2020/01/02 22:12:14 +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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: AQAeuMUPvaQi7DPN4VSsLaqw1luad7V5WVvn/Lbfy4E0Na25YRoMH1L6kHlFsEL6yrzlHq5X/pD95at/EuxemA==
ETag: W/"8ff898194489e24e2e0335aa2115a55e"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=ak5kSjdBVW42VUhLMnBYLyswbmpXb1B0bFordk9JNTh2OWFqMDNnLzBPeTA4NVA2V242RFVETkhrYjROUllOMWF5cStLcUJWMTNTNDZmNklNNWlEVjBVR2k4cEx0cEZZRlhnNXhYMS9wTW1Sdm9UMVJKRmg0c3V2My8yUVRqQ3BFbEJOc2RySEprZkNLZnNQbnZUTysydDhucTZPQm1pc1UybWV3bWZuMG1rS1pFejNEZFQwRGRxRWlsOGN5ZzRKLS1kZC9yVVloTXM4QmJWbDFGK2NsRXNnPT0%3D--e35c425b09c5351d02f16060c96fe580933627e8; path=/; HttpOnly
X-Request-Id: dcc7f7da-37f0-4ebc-89e7-9d4ca75b5389
X-Runtime: 0.362146
Content-Length: 241

Body

{
  "user_registration": {
    "canvas_user_id": 1234,
    "catalog": {
      "id": 9,
      "name": "Domain Account 10"
    },
    "name": "Barack Obama",
    "email": "barack@obama.com",
    "custom_fields": {
    },
    "created_at": "2020/01/02 22:12:14 +0000",
    "updated_at": "2020/01/02 22:12:14 +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
Content-Type: application/json; charset=utf-8
X-CSRF-Token: 40PM+EB8WreJInSKZWG091NlD3dwnSA5HDDKJ1V+sa41HwI1K1etciRnzTeLeyPAYGb6CwSrDU+bWWe8Kr7yAA==
ETag: W/"7a07832a7eccdb53c337229b0f3509fc"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=b3lYRjZ2OHEyOEZRUnNPZlcwYzFuRkNBaXJmdlpnVzdweVNsamVQd1JBQm8yZG9qM3NkdldMWEt3Ni9yZGc1TklEVm5tRmFEalpUdkhDZGs0b09HWURzekFOUW9WR01xTlA4eVJEZll6NFV2dDFQRkU2Y3h2TFJIeHU2QjlvQWV5L0l0VGlBN1NUZVNSMnphNVhyNzJVa0hsTXl6Tm12RlBGcVo2ZTQwQVFtMFdJUkdHNkVwRVBhN1hpWmdCNHFrLS1XS3VOdVI4dW9wUVRIZGdiWWNSZmFRPT0%3D--11ee64a5b1062c6a115d942129a9859b01373063; path=/; HttpOnly
X-Request-Id: 9a47b95c-b239-4a9e-8a2d-f3dc5122677d
X-Runtime: 0.046473
Content-Length: 253

Body

{
  "applicant": {
    "id": 1,
    "user": {
      "id": 1,
      "name": "Applicant",
      "email": "plz@letmein.com"
    },
    "listing": {
      "id": 8,
      "title": "Course 7"
    },
    "notified_of_opening_at": null,
    "status": "waitlist",
    "created_at": "2020/01/02 22:12:15 +0000",
    "updated_at": "2020/01/02 22:12:15 +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
Per-Page: 20
Total: 1
Content-Type: application/json; charset=utf-8
X-CSRF-Token: e8J75hlCiuwA/s11EZzF2nrhAxyQZ3REQyeHoKGILnepdG4C1bbXDJB3A9OT1ff3+b5kVrNmQSst/UZSTzV/HQ==
ETag: W/"4447c3cb818ac3c554e33e211c99523a"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _gallery_session=SENlSjhIUFpRaFVPWmVrSyswZ1pTdEdmdmtEUW43L2JQT1VZcTdDb1hpUXJSMnpNTUQ0Q1JTQXpHOUZDL1AxTDcyOG54RmRlV3NueVphc0ZpNlkzMGJwZXpzeVIreHlIWVlZWmVraTRtR3VXOHRVRi9yempmcmpkeFVSTzVqbFpQNENIempNME9OOWNCUFdVYXpBN0hNOXVVRHFiNkg4RElOQ2NncDVYazdLTlVHU3hmZkFEdzRISUdCOXFlUzhGLS1YZ3V4Mi9LZk84RkpKN3BiQWVwOThRPT0%3D--8954185079c7156ec7259b72c9495a66e1de3241; path=/; HttpOnly
X-Request-Id: 0ed121e7-9341-4160-8e09-67517334ab35
X-Runtime: 0.044640
Content-Length: 256

Body

{
  "applicants": [
    {
      "id": 2,
      "user": {
        "id": 2,
        "name": "Applicant",
        "email": "plz@letmein.com"
      },
      "listing": {
        "id": 9,
        "title": "Course 8"
      },
      "notified_of_opening_at": null,
      "status": "waitlist",
      "created_at": "2020/01/02 22:12:15 +0000",
      "updated_at": "2020/01/02 22:12:15 +0000"
    }
  ]
}