Reference of all API calls available. Consult also the concepts documentation and the Swagger documentation available for the interactive version of the API.
Note: The Customer entity contains information related to the customer’s account at
clickworker.com, such as the current account balance. Customers order products using Task
Templates and provide data to create Tasks from it.
The Customer entity contains information related to the customer’s account at clickworker.com, such as the current account balance. Customers order products using Task Templates and provide data to create Tasks from it.
All of the attributes exposed to the Customer entity are read-only (r/-). Their primary purpose is to allow account balance monitoring.
Attributes
Name | Type | Access | Description |
---|---|---|---|
balance_amount | Numeric | r/- | The money available on the customer’s account |
credit_limit | Numeric | r/- | The credit limit granted to the customer. It’s always a numeric value greater than or equal to zero. Customers can only submit new orders and tasks as long as the cost for the task <= balance amount + credit limit. |
reserved_amount | Numeric | r/- | The amount of money reserved for running tasks |
currency_code | String | r/-v | The customer’s currency, based on ISO codes. This will be applied to all clickworker services requested by the customer. |
Representation
<customer>
<link href=”${href}” rel=”self” type=”application/xml” />
<balance>
<balance_amount>${balance_amount}</balance_amount>
<reserved_amount>${reserved_amount}</reserved_amount>
<credit_limit>${credit_limit}</credit_limit>
<currency_code>${currency_code}</currency_code>
</balance>
</customer>
customer: {
link: [{
href: “${href}”,
rel: “self”,
type: “application/json”
}],
balance: {
balance_amount: ${balance_amount},
reserved_amount: ${reserved_amount},
credit_limit: ${credit_limit},
currency_code: “${currency_code}”
}
}
Operations
Account information is returned for the customer account, which authenticates using the request’s credentials. As a result, there is no customer id or name present in the URI.
Calling /customer without further information will print the customer’s account data.
View Customer Account
Request
Request line:
GET [context]/customer
Request parameter:
(Common only)
Request body
(Empty)
Response
Response status:
- 200, if the resource was found
- 401 , if the incoming request does not contain useable credentials
- 403, if the given credentials do not match a registered customer
Response body:
<customer_response>
<request_status> [...] </request_status>
<customer>
<link href=“/api/marketplace/v2/customer” rel=”self”
type=”application/xml” />
<balance>
<balance_amount>20000.00</balance_amount>
<reserved_amount>5000.00</reserved_amount>
<credit_limit>3000.00</credit_limit>
<currency_code>EUR</currency_code
</balance>
</customer>
</customer_response>
customer_response: {
request_status: [...],
customer: {
link: [{ href: “/api/marketplace/v2/customer”,
rel: “self”,
type: “application/json” }],
balance: { balance_amount: 20000.00,
reserved_amount: 5000.00,
credit_limit: 3000.00,
currency_code: “EUR” }
}}