Add payroll migration files to a legal entity
Attach year-to-date payroll files to a legal entity's payroll migration import, created on the first call. Upload each file to the Deel file service first and pass the id and secret it returns. The import stays IN_PROGRESS until submitted; attaching files to a submitted one reopens it. Atomic: one rejected file stores nothing.
**Token scopes**: `global-payroll:write`
Authentication
AuthorizationBearer
## Authentication
The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail.
```curl
curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
-H 'Authorization: Bearer YOUR-TOKEN-HERE'
```
[Learn more about authentication](/api/authentication)
OR
AuthorizationBearer
Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/
Path parameters
legal_entity_id
The unique identifier of the legal entity the payroll migration files belong to.
Request
This endpoint expects an object.
data
The payroll migration files to attach to the import.
Response
OK
data
The payroll migration import.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error