Get all worker's contracts

This interface is used to get all worker's contracts, and you can filter the currently available contracts using the "filter" parameter.

Get all worker's contracts

GET /get-all-ee-contract

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Required
Description

customer_id

string

The unique Marco identifier for your company

search_start_date

date

Start date of the date range filter, only contract start date on or after the selected date will be returned

search_end_date

date

End Date of the date range filter, only contract end date on or after the selected date will be returned

pagination

json

Each page returns 50 records. By defualt, the first page data is returned. Example: {"page": 3}

filter

json

Add is_active filter to get current active contract Filter items:

  1. is_active: boolean

For Example: {"is_active":true}

Parameter Example:

{
  "customer_id": 1,
  "filter": {
    "is_active": "true"
  },
  "pagination": {
    "page": "1"
  },
  "search_start_date": "2024-01-01",
  "search_end_date": "2024-12-12"
}

Response

{
    "itemsReceived": 1,
    "curPage": 1,
    "nextPage": null,
    "prevPage": null,
    "offset": 0,
    "itemsTotal": 1,
    "pageTotal": 1,
    "items": [
        {
            "id": 3934,
            "customer_id": 1,
            "country": "CN",
            "is_local": true,
            "home_host": "Home",
            "staff_type": "EOR",
            "ec_vendor": "Marco Test",
            "ec_entity": "Marco Test - Entity 1",
            "ec_type": "Fixed-term",
            "ec_copy": {
                "id": 21226,
                "file_name": "New Microsoft Word Document.docx",
                "file_type": "docx",
                "file_url": "https://marcopayroll-production.s3.ap-southeast-1.amazonaws.com/doc/e8c7e62b-8137-4445-91ae-42102e0422bd-1729152325683.docx?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR7OVYMK3MWXZDBXJ%2F20241017%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20241017T080531Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Signature=cb9ac55ef71b8190cc61a9a13239249b7228344bc042cb368c4ed39b11d6a6aa"
            },
            "start_date": "2024-07-10",
            "end_date": "2025-07-31",
            "ic_type": "",
            "ic_entity": 0,
            "user": 2232,
            "platform_email": "[email protected]"
        }
    ]
}

Last updated