Attach 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. Error codes: 400 FILE_CLAIM_FAILED, 401 UNAUTHORIZED, 403 FORBIDDEN, 403 PAYROLL_MIGRATION_IMPORT_DISABLED, 404 NOT_FOUND, 409 DUPLICATE_IMPORT_FILE, 500 INTERNAL_SERVER_ERROR. **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.deel.training/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_idstringRequiredformat: "uuid"
The unique identifier of the legal entity the payroll migration files belong to.

Request

This endpoint expects an object.
dataobjectRequired
The payroll migration files to attach to the import.

Response

OK
dataobject
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