# Submit an assignment

**Requires scope:** `setu`.
The main element of the message, this container holds all elements needed
to define an assignment (a human resource placed at a staffing customer) in
the SETU standard.

Endpoint: POST /api/setu/1.4.1/assignment
Security: apiKey

## Request fields (application/xml):

  - `Assignment` (object)

  - `Assignment.assignmentStatus` (string, required)
    Specifies the intended action of the Assignment message.
Currently only `active` is supported.
    Enum: "active", "cancelled", "revised", "x:rejected"

  - `Assignment.AssignmentId` (object, required)
    Container for the unique identifier of the assignment.

  - `Assignment.AssignmentId.idOwner` (string, required)
    The organization that issues the identifier. Also responsible for the
uniqueness of the identifier within its own context.
    Enum: "StaffingCompany"

  - `Assignment.AssignmentId.IdValue` (string, required)
    The unique identifier of the assignment.

  - `Assignment.ReferenceInformation` (object, required)
    Container for references to the staffing customer and the human resource.

  - `Assignment.ReferenceInformation.StaffingCustomerId` (object, required)
    Container for the identifier of the staffing customer.

  - `Assignment.ReferenceInformation.StaffingCustomerId.idOwner` (string, required)
    The organization that issues the identifier. Also responsible for
uniqueness of the identifier within its own context.
    Enum: "BTW", "Fi", "KvK", "OIN", "StaffingCompany", "StaffingCustomer"

  - `Assignment.ReferenceInformation.StaffingCustomerId.IdValue` (string, required)
    The unique identifier of the staffing customer.

  - `Assignment.ReferenceInformation.HumanResourceId` (object, required)
    Container for the reference to the human resource. May appear multiple
times.

  - `Assignment.ReferenceInformation.HumanResourceId.idOwner` (string, required)
    The organization that issues the identifier. Also responsible for
uniqueness of the identifier within its own context.
    Enum: "StaffingCompany", "StaffingCustomer"

  - `Assignment.ReferenceInformation.HumanResourceId.IdValue` (string, required)
    The unique identifier of the human resource.

  - `Assignment.ReferenceInformation.PositionId` (object, required)
    Not used in SETU, but mandatory in HR-XML.

  - `Assignment.ReferenceInformation.PositionId.IdValue` (string, required)
    Not used in SETU, but mandatory in HR-XML. Must be included on
the message but left empty.

  - `Assignment.CustomerReportingRequirements` (object, required)
    Container for (reporting) related information concerning the offer.

  - `Assignment.CustomerReportingRequirements.CostCenterName` (string)
    The name of the cost center of the staffing customer for the
staffing position.

  - `Assignment.Rates` (object, required)
    Information about the rates for the assignment. May appear multiple times.

  - `Assignment.Rates.rateType` (string, required)
    Whether the rate should be billed to the staffing customer or paid to
the human resource.
    Enum: "bill", "pay"

  - `Assignment.Rates.rateStatus` (string, required)
    The `rates` container is used in multiple standards. In the Assignment
message `rateStatus` must always be `agreed`. Agreement on the rate is
done in a framework agreement or during ordering and selection.
    Enum: "agreed"

  - `Assignment.Rates.Amount` (object, required)
    The amount of the rate.

  - `Assignment.Rates.Amount.rateAmountPeriod` (string, required)
    The timeframe the rate applies to. Also used to indicate whether a
mark-up is consolidated within the rate or specified as a separate
(split) rate.
    Enum: "hourly"

  - `Assignment.Rates.Amount.currency` (string, required)
    The currency in which the rate amount is specified.
    Enum: "EUR"

  - `Assignment.Rates.Class` (string, required)
    Whether the rate applies to an allowance, an expense, or a time interval.
    Enum: "Allowance", "Expense", "TimeInterval"

  - `Assignment.Rates.Multiplier` (string)
    Mandatory for rates with `Class` set to `TimeInterval`, optional for
other rate types.

  - `Assignment.Rates.StartDate` (string, required)
    The date from which the rate applies. `YYYY-MM-DD` (ISO 8601).

  - `Assignment.StaffingShift` (object, required)
    Container specifying the number of hours a human resource is hired for.
May appear multiple times.

  - `Assignment.StaffingShift.shiftPeriod` (string)
    Unused in Dyflexis but may be included in the request.

  - `Assignment.StaffingShift.Id` (object, required)
    Not used in SETU, but mandatory in HR-XML.

  - `Assignment.StaffingShift.Id.IdValue` (any, required)
    Not used in SETU, but mandatory in HR-XML, must be empty.

  - `Assignment.StaffingShift.Hours` (number)
    Unused in Dyflexis but may be included in the request.

  - `Assignment.AssignmentDateRange` (object, required)
    The start and expected end date of the assignment.

  - `Assignment.AssignmentDateRange.StartDate` (string, required)
    The start date of the assignment. `YYYY-MM-DD` (ISO 8601).

  - `Assignment.AssignmentDateRange.ExpectedEndDate` (string)
    The expected end date of the assignment. Provided if known.
Expiration of this date does not mean that the assignment has ended.
`YYYY-MM-DD` (ISO 8601).

  - `Assignment.AssignmentDateRange.ActualEndDate` (string)
    The actual end date of the assignment. Related time cards containing
working hours dated after this `ActualEndDate` cannot be processed.
`YYYY-MM-DD` (ISO 8601).

  - `Assignment.UserArea` (object, required)
    Container for references to the `UserArea`.

  - `Assignment.UserArea.AssignmentAdditionalNL` (object, required)

  - `Assignment.UserArea.AssignmentAdditionalNL.SETUVersionId` (string, required)
    Version of the SETU standard used for `Assignment`.
    Enum: "1.4"

  - `Assignment.UserArea.AssignmentAdditionalNL.JobTitle` (string)
    The title of the position the human resource will fulfil.

  - `Assignment.UserArea.AssignmentAdditionalNL.InclusiveRate` (boolean)
    Unused in Dyflexis but may be included in the request.

## Response 400 fields (application/xml):

  - `errors` (array)

  - `errors.message` (string)

  - `errors.code` (null | string)

  - `errors.context` (object)

  - `errors.context.field` (null | string)
    The field related to the encountered error.

## Response 401 fields (application/xml):

  - `message` (string)
    Invalid authentication token
    Example: Unauthorized

## Response 403 fields (application/xml):

  - `message` (string)
    Invalid authentication token scope
    Example: Forbidden

