Orders
An Order must be placed for a Job to collect Judgments. When you create a new debit order, you can specify how many units you would like fulfilled for the Job. You must have enough money in your account to create an Order.
Attributes
Read / Write
- job_id
Read-only
- id
- type
- meta
- created_at
- updated_at
- user_id
Methods
Common
| Action | URL / Params | Verb |
|---|---|---|
| Create | /jobs/$JOB_ID/orders | POST |
| Read | /jobs/$JOB_ID/orders/:id | GET |
Parameters
- debit[units_count]
- A positive integer representing the number of units that should be ordered.
- channels[]
- A collection of channels that the job should be posted to. Valid channels are: (amt, iphone, mob, sama), corresponding to Amazon Mechanical Turk, the Give Work iPhone App, the CrowdFlower internal interface (“MobMerge”), and Samasource.
channels[]should be supplied once for each of the values you would like to use. See the examples below.
Response
If you do not have enough credits to create an order, the response status will be 402 and the body will be:
{
"error":
{"message": "You have $20.00 available but this order will cost $50.00. You can purchase more at http://crowdflower.com/orders/new"}
}
If the order creation is successful, you will be redirected to the new order and the body of the redirect will be:
{
"success":
{"message": "Your job is now collecting judgments!"}
}
Examples
A simple example of creating an order for Amazon Mechanical Turk and Samasource using the common command-line tool “wget:”
wget --post-data="key=XXX&debit[units_count]=18&channels[]=amt&channels[]=sama" http://api.crowdflower.com/v1/jobs/YYYY/orders