-
Notifications
You must be signed in to change notification settings - Fork 0
POST Projects
phw edited this page Oct 12, 2012
·
15 revisions
Request: POST /projects
Creates a new project with the state prepared and returns the result.
| Header | Description |
|---|---|
| Authorize | oAuth 2 authentication header |
| Accept |
application/json or application/xml
|
| Content-Type | The content type of the posted data (application/json or application/xml) |
| HTTP status | Description |
|---|---|
| 201 Created | The project was successfully created, the Location header contains the URI of the created project |
| 400 Bad Request | The input data was incomplete or contained errors. |
Load the project with the ID 9f7f369f-670b-4bc0-8925-0344bfb68b70:
POST /v1/projects HTTP/1.1
Host: api.textking.com
Accept: application/json
Content-Type: application/json
Authorize: Bearer youraccesstoken
{
"name": "My Translation Project",
"due_date": "2012-11-16"
}
Response:
{
"id": "29163f4f-7c8f-4baf-adf3-753c1df429c2",
"number": null,
"name": "My Translation Project",
"due_date": "2012-11-16T00:00:00",
"state": "prepared",
"currency": "EUR",
"net_price": null,
"vat": null,
"coupon_name": null,
"coupon_value": null,
"discount_customer": null,
"discount_project": null,
"affiliate_id": null,
"billing_address": "9c6f23b6-167d-4b01-977f-4de799e3abf3",
"links": [
{
"rel": "self",
"href": "https://api.textking.dev/v1/project/29163f4f-7c8f-4baf-adf3-753c1df429c2"
},
{
"rel": "urn:textking:jobs",
"href": "https://api.textking.dev/v1/project/29163f4f-7c8f-4baf-adf3-753c1df429c2/jobs"
},
{
"rel": "urn:textking:line_items",
"href": "https://api.textking.dev/v1/project/29163f4f-7c8f-4baf-adf3-753c1df429c2/line-items"
},
{
"rel": "urn:textking:billing_address",
"href": "https://api.textking.dev/v1/account/address/9c6f23b6-167d-4b01-977f-4de799e3abf3"
}
]
}