GET Projects - TextKing/textking-api GitHub Wiki

GET /projects

Request: GET /projects

Returns a collection of projects of the authorized customer.

Query parameters

Parameter Description
per_page An integer value defining how many entries should be returned. Only values between 1 and 100 (both inclusive) are allowed. If not given, this defaults to 100.
page Return search results starting at a given page. Used for paging through more than one page of results.
state Filter projects by status: prepared, running, finished, canceled

Request headers

Header Description
Authorization oAuth 2 authentication header
Accept application/json or application/xml

Response status codes

HTTP status Description
200 Ok Successful request.

Example

Load the first two projects with the status prepared:

GET /v1/projects?state=prepared&per_page=2 HTTP/1.1
Host: api.textking.com
Accept: application/json
Authorization: Bearer youraccesstoken

Response:

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
    "page": 1,
    "per_page": 2,
    "total": 16,
    "items": [
        {
            "id": "19fe745b-3dcb-41dc-9f42-e01b3fe9f3ca",
            "number": null,
            "name": "My Translation Project",
            "due_date": "2012-12-24T00:00:00",
            "state": "prepared",
            "currency": "EUR",
            "net_price": 432.4,
            "vat": 8,
            "coupon_name": null,
            "coupon_value": null,
            "discount_customer": 0,
            "discount_project": 0,
            "affiliate_id": null,
            "billing_address": "9c6f23b6-167d-4b01-977f-4de799e3abf3",
            "links": [
                {
                    "rel": "self",
                    "href": "https://api.textking.com/v1/project/19fe745b-3dcb-41dc-9f42-e01b3fe9f3ca"
                },
                {
                    "rel": "urn:textking:jobs",
                    "href": "https://api.textking.com/v1/project/19fe745b-3dcb-41dc-9f42-e01b3fe9f3ca/jobs"
                },
                {
                    "rel": "urn:textking:line_items",
                    "href": "https://api.textking.com/v1/project/19fe745b-3dcb-41dc-9f42-e01b3fe9f3ca/line-items"
                },
                {
                    "rel": "urn:textking:billing_address",
                    "href": "https://api.textking.com/v1/account/address/9c6f23b6-167d-4b01-977f-4de799e3abf3"
                }
            ]
        },
        {
            "id": "9f7f369f-670b-4bc0-8925-0344bfb68b70",
            "number": null,
            "name": "Another translation project",
            "due_date": "2012-10-22T00:00:00",
            "state": "prepared",
            "currency": "EUR",
            "net_price": 19.4,
            "vat": 8,
            "coupon_name": null,
            "coupon_value": null,
            "discount_customer": 0,
            "discount_project": 0,
            "affiliate_id": null,
            "billing_address": "9c6f23b6-167d-4b01-977f-4de799e3abf3",
            "links": [
                {
                    "rel": "self",
                    "href": "https://api.textking.com/v1/project/9f7f369f-670b-4bc0-8925-0344bfb68b70"
                },
                {
                    "rel": "urn:textking:jobs",
                    "href": "https://api.textking.com/v1/project/9f7f369f-670b-4bc0-8925-0344bfb68b70/jobs"
                },
                {
                    "rel": "urn:textking:line_items",
                    "href": "https://api.textking.com/v1/project/9f7f369f-670b-4bc0-8925-0344bfb68b70/line-items"
                },
                {
                    "rel": "urn:textking:billing_address",
                    "href": "https://api.textking.com/v1/account/address/9c6f23b6-167d-4b01-977f-4de799e3abf3"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://api.textking.com/v1/projects?page=1&per_page=2"
        },
        {
            "rel": "next",
            "href": "https://api.textking.com/v1/projects?page=2&per_page=2"
        }
    ]
}
⚠️ **GitHub.com Fallback** ⚠️