---
agentTools:
  projectIndex: https://newcraft.readme.io/llms.txt
---

# Retrieve a specific payroll run

Retrieves a specific payroll run data.

[block:api-header]
{
  "title": "Response Definitions"
}
[/block]

| Response Item                         | Description                                                                               | Data type |
| :------------------------------------ | :---------------------------------------------------------------------------------------- | :-------- |
| id                                    | The ID associated with the employee on payroll. Each employee ID is assigned by NewCraft. | String    |
| attributes/{id}                       | The ID associated with the employee on payroll. Each employee ID is assigned by NewCraft. | String    |
| attributes/{check\_data}              | The date and time the employee was last given a paycheck, in Zulu time.                   | String    |
| attributes/{pay\_period\_end\_date}   | The end date of the employee's most recent pay period, in the format "YYYY-MM-DD".        | String    |
| attributes/{pay\_period\_start\_date} | The start date of the employee's most recent pay period, in the format "YYYY-MM-DD".      | String    |

[block:api-header]
{
  "title": "Sample Response"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"data\": {\n    \"id\": \"6cfee506-f278-4d31-b9b3-01b5505fd5b3\",\n    \"type\": \"Payroll\",\n    \"attributes\": {\n      \"id\": \"6cfee506-f278-4d31-b9b3-01b5505fd5b3\",\n      \"check_data\": \"2020-10-29T02:44:05Z\",\n      \"pay_period_end_date\": \"2020-10-29\",\n      \"pay_period_start_date\": \"2020-10-15\"\n    }\n  }\n}",
      "language": "json"
    }
  ]
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "NewCraft API Sandbox",
      "url": "https://sandbox.newcraft.io"
    },
    {
      "description": "NewCraft API Development",
      "url": "https://development.newcraft.io"
    },
    {
      "description": "NewCraft API Production",
      "url": "https://production.newcraft.io"
    }
  ],
  "info": {
    "version": "0.0.8",
    "title": "NewCraft API",
    "description": "This describes the endpoints for NewCrafts' integration API. These endpoints are subject to change."
  },
  "security": [
    {
      "application": [
        "read"
      ]
    }
  ],
  "paths": {
    "/payrolls/:payroll_id/get": {
      "post": {
        "summary": "Retrieve a specific payroll run",
        "tags": [
          "Payroll"
        ],
        "description": "Retrieves a specific payroll run data.",
        "operationId": "getPayrollById",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Payroll"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Payroll": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "6cfee506-f278-4d31-b9b3-01b5505fd5b3"
          },
          "type": {
            "type": "string",
            "example": "Payroll"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "6cfee506-f278-4d31-b9b3-01b5505fd5b3"
              },
              "check_data": {
                "type": "string",
                "example": "2020-10-29T02:44:05Z"
              },
              "pay_period_end_date": {
                "type": "string",
                "example": "2020-10-29"
              },
              "pay_period_start_date": {
                "type": "string",
                "example": "2020-10-15"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "application": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {
              "read": "allows reading resources"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 95,
      "1": 82,
      "2": 222,
      "3": 132,
      "4": 213,
      "5": 252,
      "6": 203,
      "7": 0,
      "8": 102,
      "9": 198,
      "10": 179,
      "11": 43
    }
  }
}
```