Table of Contents
- User Methods
- Actor Profile Methods
- New Profile
- Update Profile
- Show a Single Actor Profile
- Show a List of Actor Profiles
- Delete an Actor Profile
- Add an Actor Address
- Update an Actor Address
- Delete an Actor Address
- Add Actor's Contact Information
- Update Actor's Contact Information
- Delete Actor's Contact Information
- Set Actor's Primary Contact
- Director Profile Methods
- Decision Methods
Information
Welcome to the Audition City API! It's like Spatula City, but with actors.
Note: The API server is http://api.audition.city. All Methods except User Methods require that you pass an authentication token in the header; the name of the token should be Access-Token.
Register as a user to allow for creating new entries on the site.
Route /signup
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| full_name | String | User's First and Last Name |
| String | (Required) User's email (must follow format text@text.text) | |
| password | String | (Requred) User's password |
Response
If successful, you will receive:
Status Code: 201 - Created
{
"user": {
"full_name": "Johnny Actor",
"email": "email@email.com",
"auth_token": "cb5d7add166d169d4a9b3a598bd8404f"
}
}If unsuccessful, you will receive:
Status Code: 422 - Unprocessable Entity
{
"errors": [
"Email is invalid"
]
}User can login.
Route /login
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| String | (Required) users email address | |
| password | String | (Required) User's password |
Response
If successful, you will receive:
Status Code: 202 - Accepted
{
"user": {
"email": "email@email.com",
"auth_token": "cb5d7add166d169d4a9b3a598bd8404f"
}
}If unsuccessful, you will receive:
{
"error": "Could not find user for email@email.com or wrong password."
}Route /signup
Method DELETE
Request
| Parameter | Type | Description |
|---|---|---|
| string | (Required) User's email address | |
| password | string | (Required) User's password |
Response
If successful, you will receive:
{
"success": "User deleted"
}If unsuccessful, you will receive:
Status Code: 404 - Unprocessable Entity
{
"errors": [
"Email is invalid"
]
}These methods are used to manage the basic details of Actor profiles.
This is an endpoint to add Actor profiles for a specific User. This is a Multipart Encoded POST request because it may include the headshot and resume.
Route /actors/new
Method POST
Request
The Headshot must be of type image/jpeg and passed in a form object called headshot. The Resumé must be of type application/pdf and passed in a form object called resume.
The JSON data should be passed in a form object called info, with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| full_name | String | User's full name. This will change the User's full name across all profiles. |
| bio | String | Actor's biography |
| age_young | Integer | The age of the youngest role the actor is able to portray |
| age_old | Integer | The age of the oldest role the actor is able to portray |
| height_feet | Integer | The actor's height in feet |
| height_inches | Integer | The actor's height in inches |
| hair_color | String | The actor's hair color. See defined list, below. |
| eye_color | String | The actor's eye color. See defined list, below. |
| skills | Comma Separated String Values | A list of the actor's skills |
| gender | String | Male or Female |
| ethnicity | String | The actor's ethnicity. See defined list, below. |
| talent_agency | String | The name of the talent agency representing the actor. |
| union | Comma Separated String Values | A list of the actor's union memberships. |
| address1 | String | The first line of the actor's primary address. |
| address2 | String | The second line of the actor's primary address. |
| city | String | The city of the actor's primary address. |
| state | String | The two-character state abbreviation of the actor's primary address. |
| zip | String | The zip or postal code of the actor's primary address. |
| email_type | String | The actor's priamry email type ("Home", "Work", etc.) |
| String | The actor's primary email address | |
| phone_type | String | The actor's primary phone number type ("Home", "Cell Phone", etc.) |
| phone_number | String | The actor's primary phone number. |
| website_type | String | The actor's primary website label or title. |
| website_url | String | The URL of the actor's primary website. |
Hair Colors
- Blonde
- Brown
- Hazel
- Grey
- Black
- Red
- White
- Other
- None
Eye Colors
- Blue
- Brown
- Hazel
- Green
- Black
- Grey
- Purple
Ethnicities
- Black or African American
- Hispanic/Latino
- Asian/Pacific Islander
- White or Caucasian
- American Indian/Alaskan Native
- Other
Sample Request
------WebKitFormBoundaryLDO5L5uBiaTrJSgj
Content-Disposition: form-data; name="headshot"; filename="Iam-Actor-headshot-1.jpg"
Content-Type: image/jpeg
------WebKitFormBoundaryLDO5L5uBiaTrJSgj
Content-Disposition: form-data; name="resume"; filename="Iam-Actor-resume.pdf"
Content-Type: application/pdf
------WebKitFormBoundaryLDO5L5uBiaTrJSgj
Content-Disposition: form-data; name="info"
{"name":"Iam Actor","address_1":"123 Main St","address_2":null,"city":"Atlanta","state":"GA","zip":"30303","phone_type":"Home","phone":"404-555-1234","email_type":"Work","email":"iam@actor.org","Website":"http://iamactor.org","bio":"Iam Actor was born singing.","age_young":25,"age_old":35,"height_feet":5,"height_inches":8,"hair_color":Brown,"eye_color":Blue,"gender":Male,"ethnicity":"White or Caucasian","talent_agency":"Actors R Us","union":["Equity"],"skills":["Acting Instructor","Director","Prop Artisan"]}
------WebKitFormBoundaryLDO5L5uBiaTrJSgj--
Response
If successful, you will receive:
Status Code: 201 - Created
{
"actor": {
"id": 9,
"full_name": "Johnny Actor",
"bio": "Johnny was a young boy with nothing much except a certain kind of look in his eye. He was discovered one day. You see, he had a certain kind of appeal for a certain kind of guy who gave him some advice on what to wear.",
"age_young": 25,
"age_old": 35,
"height_feet": 5,
"height_inches": 7,
"hair_color": "Brown",
"eye_color": "Brown",
"skills": "actor, singer",
"gender": "Male",
"ethnicity": "White or Caucasian",
"talent_agency": "The People Store",
"union": "Equity"
}
}Updating an Actor profile includes many of the same parameters as creating a new profile. However, contact information (address, email, phone, website URL) is not included.
The headshot and resume can be included in this request. Therefore, the structure of this request is the same as creating a new profile.
Route /actors/:id
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| full_name | String | User's full name. This will change the User's full name across all profiles. |
| bio | String | Actor's biography |
| age_young | Integer | The age of the youngest role the actor is able to portray |
| age_old | Integer | The age of the oldest role the actor is able to portray |
| height_feet | Integer | The actor's height in feet |
| height_inches | Integer | The actor's height in inches |
| hair_color | String | The actor's hair color. See defined list, under the New Profile method. |
| eye_color | String | The actor's eye color. See defined list, under the New Profile method. |
| skills | Comma Separated String Values | A list of the actor's skills |
| gender | String | Male or Female |
| ethnicity | String | The actor's ethnicity. See defined list, under the New Profile method. |
| talent_agency | String | The name of the talent agency representing the actor. |
| union | Comma Separated String Values | A list of the actor's union memberships. |
Response
If successful, you will receive:
Status Code: 200 - OK
{
"actor": {
"id": 9,
"full_name": "Johnny Actor",
"bio": "Johnny was a young boy with nothing much except a certain kind of look in his eye. He was discovered one day. You see, he had a certain kind of appeal for a certain kind of guy who gave him some advice on what to wear.",
"age_young": 25,
"age_old": 35,
"height_feet": 5,
"height_inches": 7,
"hair_color": "Brown",
"eye_color": "Brown",
"skills": "actor, singer",
"gender": "Male",
"ethnicity": "White or Caucasian",
"talent_agency": "The People Store",
"union": "Equity"
}
}Route /actors/:id
Method GET
Response
If successful, you will receive:
Status Code: 200 - OK
{
"actor": {
"id": 9,
"full_name": "Johnny Actor",
"bio": "Johnny was a young boy with nothing much except a certain kind of look in his eye. He was discovered one day. You see, he had a certain kind of appeal for a certain kind of guy who gave him some advice on what to wear.",
"age_young": 25,
"age_old": 35,
"height_feet": 5,
"height_inches": 7,
"hair_color": "Brown",
"eye_color": "Brown",
"skills": "actor, singer",
"gender": "Male",
"ethnicity": "White or Caucasian",
"talent_agency": "The People Store",
"union": "Equity"
}
}Route /actors
Method GET
Parameters
The following search parameters can be used. Each additional search parameter will narrow the search results. If no parameters are used, all actor records will be returned.
| Parameter | Type | Description |
|---|---|---|
| bio | String | Search for a word or phrase included in the bio |
| age_young | Integer | This will return actors will an age_young less than the search parameter. |
| age_old | Integer | This will return actors with an age_old greater than the search parameter. |
| hair_color | String | The actor's hair color. See defined list, under the New Profile method. |
| eye_color | String | The actor's eye color. See defined list, under the New Profile method. |
| skills | String | For now, you can only search for one skill at a time. |
| gender | String | Male or Female |
| ethnicity | String | The actor's ethnicity. See defined list, under the New Profile method. |
| union | String | The actor's union membership. For now, you can only search for one union at a time. |
Response
If successful, you will receive:
Status Code: 200 - OK
{
"actors": [
{
"actor": {
"id": 1,
"full_name": "Johnny Actor",
"bio": "Johnny was a young boy with nothing much except a certain kind of look in his eye. He was discovered one day. You see, he had a certain kind of appeal for a certain kind of guy who gave him some advice on what to wear.",
"age_young": 25,
"age_old": 35,
"height_feet": 5,
"height_inches": 7,
"hair_color": "Brown",
"eye_color": "Brown",
"skills": "actor, singer",
"gender": "Male",
"ethnicity": "White or Caucasian",
"talent_agency": "Actors R Us",
"union": "Equity",
"headshot_full": "/headshots/full/missing.png",
"headshot_large": "/headshots/large/missing.png",
"headshot_mobile": "/headshots/mobile/missing.png",
"headshot_small": "/headshots/small/missing.png",
"headshot_thumb": "/headshots/thumb/missing.png",
"resume": "/resumes/original/missing.png"
}
}
]
}Route /actors/:id
Method DELETE
Response
If successful, you will receive:
Status Code: 200 - OK
{
"success": "Actor Profile Deleted"
}Route /actors/:id/address
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| address_type | String | The Address type (Home, Work, etc.) |
| address1 | String | The first line of the address |
| address2 | String | The second line of the address |
| city | String | The city |
| state | String | The two-character state abbreviation |
| zip | String | The zip code |
Route /actors/:id/address/:type
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| address_type | String | The Address type (Home, Work, etc.) |
| address1 | String | The first line of the address |
| address2 | String | The second line of the address |
| city | String | The city |
| state | String | The two-character state abbreviation |
| zip | String | The zip code |
Route /actors/:id/address/:type
Method DELETE
That's it!
Route /actors/:id/:medium
For this Route, :medium should either be email, phone, or url
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| type | String | The contact type (Home, Work, etc.) |
email (if :medium is email) |
String | The Actor's email address |
phone (if :medium is phone) |
String | The Actor's phone number |
website_url (if :medium is url) |
String | The URL for the Actor's website |
Route /actors/:id/:medium
For this Route, :medium should either be email, phone, or url
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| type | String | The contact type (Home, Work, etc.) |
email (if :medium is email) |
String | The Actor's email address |
phone (if :medium is phone) |
String | The Actor's phone number |
website_url (if :medium is url) |
String | The URL for the Actor's website |
Route /actors/:id/primary/:medium
For this Route, :medium should either be address, email, phone, or url
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| primary | String | The name of the contact type (Home, Work, etc.) |
These methods are used to manage the basic details of Director profiles.
This is an endpoint to add Director profiles for a specific User.
Route /directors/new
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| full_name | String | User's full name. This will change the User's full name across all profiles. |
| company_name | String | The Director's company name |
| address1 | String | The first line of the director's primary address. |
| address2 | String | The second line of the director's primary address. |
| city | String | The city of the director's primary address. |
| state | String | The two-character state abbreviation of the director's primary address. |
| zip | String | The zip or postal code of the director's primary address. |
| email_type | String | The director's priamry email type ("Home", "Work", etc.) |
| String | The director's primary email address | |
| phone_type | String | The director's primary phone number type ("Home", "Cell Phone", etc.) |
| phone_number | String | The director's primary phone number. |
| website_type | String | The director's primary website label or title. |
| website_url | String | The URL of the director's primary website. |
Response
If successful, you will receive:
Status Code: 201 - Created
{
"director": {
"id": 1,
"full_name": "Johnny Director",
"company_name": "Amazing Productions",
"addresses": [
{
"type": "Home",
"address1": "123 Main St",
"address2": "Suite 456",
"city": "Atlanta",
"state": "GA",
"zip": "30303"
}
],
"emails": [
{
"type": "Home",
"email": "amazing@director.com"
}
],
"phones": [
{
"type": "Home",
"phone": "404-404-40404"
}
],
"urls": [
{
"type": "Personal",
"url": "http://director.com"
}
]
}
}Updating a Director profile includes many of the same parameters as creating a new profile. However, contact information (address, email, phone, website URL) is not included.
Route /directors/:id
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| full_name | String | User's full name. This will change the User's full name across all profiles. |
| company_name | String | The Director's company name |
Route /directors/:id
Method GET
Response
If successful, you will receive:
Status Code: 200 - OK
{
"director": {
"id": 1,
"full_name": "Johnny Director",
"company_name": "Amazing Productions",
"addresses": [
{
"type": "Home",
"address1": "123 Main St",
"address2": "Suite 456",
"city": "Atlanta",
"state": "GA",
"zip": "30303"
}
],
"emails": [
{
"type": "Home",
"email": "amazing@director.com"
}
],
"phones": [
{
"type": "Home",
"phone": "404-404-40404"
}
],
"urls": [
{
"type": "Personal",
"url": "http://director.com"
}
]
}
}Route /directors
Method GET
Response
If successful, you will receive:
Status Code: 200 - OK
{
"directors": [
{
"director": {
"id": 1,
"full_name": "Johnny Director",
"company_name": "Amazing Productions",
"addresses": [
{
"type": "Home",
"address1": "123 Main St",
"address2": "Suite 456",
"city": "Atlanta",
"state": "GA",
"zip": "30303"
}
],
"emails": [
{
"type": "Home",
"email": "amazing@director.com"
}
],
"phones": [
{
"type": "Home",
"phone": "404-404-40404"
}
],
"urls": [
{
"type": "Personal",
"url": "http://director.com"
}
]
}
}
]
}Route /directors/:id
Method DELETE
Response
If successful, you will receive:
Status Code: 200 - OK
{
"success": "Director Profile Deleted"
}Decisions are made by directors. They can take notes on any actor and decide whether to mark an actor for a callback. Note: All decision calls assume the user is logged on as a Director. Therefore, the Access-Token in the header must be for a User who has a Director profile.
Route /decisions/new
Method POST
Request
| Parameter | Type | Description |
|---|---|---|
| actor_id | Integer | The ID number of the actor |
| notes | Text | The director's notes about the actor |
| callback | Boolean | A flag the director can turn on or off for any actor (false by default) |
For the Boolean field, pass the word "true" or "false".
Response
If successful, you will receive:
Status Code: 201 - Created
{
"decision": {
"notes": "These are some notes",
"callback": true,
"actor": {
"id": 1,
"full_name": "Johnny Actor"
},
"director": {
"id": 2,
"full_name": "Awesome Director"
}
}
}Route /decisions/:id
Method PUT
Request
| Parameter | Type | Description |
|---|---|---|
| actor_id | Integer | The ID number of the actor |
| notes | Text | The director's notes about the actor |
| callback | Boolean | A flag the director can turn on or off for any actor |
Route /decisions/:id
Method GET
Response
If successful, you will receive:
Status Code: 200 - OK
{
"decision": {
"notes": "These are some notes",
"callback": true,
"actor": {
"id": 1,
"full_name": "Johnny Actor"
},
"director": {
"id": 2,
"full_name": "Awesome Director"
}
}
}This will show a list of decisions only for the currently logged-in Director.
Route /decisions
Method GET
Parameters
The following search parameters can be used. Each additional search parameter will narrow the search results. If no parameters are used, all decision records for the Director will be returned.
| Parameter | Type | Description |
|---|---|---|
| callback | Empty | Only the callback key is needed. This parameter will return decisions marked for callback. |
| notes | String | Search for a word or phrase included in the notes. Caution: The search string is case sensitive. |
Response
If successful, you will receive:
Status Code: 200 - OK
{
"decisions": [
{
"decision": {
"id": 1,
"notes": "Some notes",
"callback": false,
"actor": {
"id": 1,
"full_name": "Test Console"
},
"director": {
"id": 2,
"full_name": "Another User"
}
}
}
]
}Route /decisions/:id
Method DELETE
Response
If successful, you will receive:
Status Code: 200 - OK
{
"success": "Decision Deleted"
}