Create positions

Operation ID: createPsaPositions

Group: PSA › Positions

Open in the interactive reference

POST /psa/positions

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Creates one or more positions (project roles) on one PSA project. Every entry is checked before anything is written, and every problem found is returned, each with the index of its entry. If any entry fails, nothing is created.

Only the entries you send are validated; other positions of the project are not re-checked.

Every identifier is a UUID, the same one the matching GET endpoint returns. As in the Roles tab, a billable position bills a sales order line (salesOrderProductLineId, and its rate card entry when the line prices by rate card). The line supplies the bill rate and unit of measure, and fills in what you leave out: the name (the rate card entry's identifier and description, otherwise the product name), the cost rate, the HR position and the skill level (from the role catalog of the line's product line). Product details are never taken from the request. Without a line, send hourlyBillRate. Rates are hourly and in the project currency.

Use the returned ids as position ids, for example on GET psa/positions/:id or as projectPositionId when adding team members.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createPsaPositionsInput.

Field Type Required Description
projectId string yes The PSA project the positions belong to. See id on GET psa/projects/:id. Creating positions needs edit permission on this project. Example: "3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45".
positions array<object> yes The positions to create. Either all are created, or none are. Example: [{"name":"Senior Consultant","billable":true,"hourlyBillRate":"180.00","hourlyCostRate":"95.00","hoursBudget":"320"},{"salesOrderProductLineId":"0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3"}].
positions[].name string no The display name. When omitted with a sales order line, it is the rate card entry's 'identifier - description' (or identifier), otherwise the line's product name. Must not end up blank (NAME_REQUIRED).
positions[].description string no A free-form description of the position's responsibilities.
positions[].billable boolean no Whether work in this position is billable to the customer. Defaults to true on a Billable project and false otherwise. Internal and NonBillable projects cannot have billable positions.
positions[].unitOfMeasure string no The billing unit: 'hour' (default) or 'day'. With a sales order line it must equal that line's (or its rate card entry's) unit, or be left out. One of: "hour", "day".
positions[].hourlyBillRate decimal no The bill rate per hour, non-negative, in hourlyBillRateCurrency. Required for a billable position without a sales order line; not allowed with one, since the line supplies it. A non-billable position takes only 0 and stores 0.
positions[].hourlyBillRateCurrency string no The currency of hourlyBillRate. Format ISO 4217. Must be the project currency, which is also the default.
positions[].hourlyCostRate decimal no The cost rate per hour, non-negative, in hourlyCostRateCurrency. When omitted on a billable position with a sales order line, it is taken from the role catalog of that line's product line; otherwise it defaults to 0.
positions[].hourlyCostRateCurrency string no The currency of hourlyCostRate. Format ISO 4217. Must be the project currency, which is also the default.
positions[].hoursBudget decimal no The budgeted hours, a non-negative count of hours.
positions[].salesOrderProductLineId string no The sales order product line to bill, as salesOrderProductLineId on GET psa/positions. Billable positions only. It must be a billable time line of a sales order under the project's sales arrangement that no other project of that arrangement uses.
positions[].salesOrderProductLineRateCardEntryId string no The rate card entry of salesOrderProductLineId to bill, as on GET psa/positions. Required when that line has rate card entries.
positions[].hrPositionId string no The HR position this project role maps to. See id on GET people/positions/:id. When omitted with a sales order line, it is taken from the role catalog of the line's product line.
positions[].skillLevelId string no The skill level (position seniority) this project role maps to, as skillLevelId on GET psa/positions. When omitted with a sales order line, it is taken from the role catalog of the line's product line.
{
  "projectId": "3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45",
  "positions": [
    {
      "name": "Senior Consultant",
      "billable": true,
      "hourlyBillRate": "180.00",
      "hourlyCostRate": "95.00",
      "hoursBudget": "320"
    },
    {
      "salesOrderProductLineId": "0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3"
    }
  ]
}

Response

200 Success

Under data (createPsaPositionsOutput):

Field Type Required Description
created array<object> yes The created positions, in the order the request sent them. Example: [{"id":"5c1e0a7d-3b92-4f64-8e21-d07a9b4c6f15"},{"id":"a8d43f20-6c1b-4e97-b5a2-1f3e9c7d0b48"}].
created[].id string yes The unique identifier of the created position.
{
  "data": {
    "created": [
      {
        "id": "5c1e0a7d-3b92-4f64-8e21-d07a9b4c6f15"
      },
      {
        "id": "a8d43f20-6c1b-4e97-b5a2-1f3e9c7d0b48"
      }
    ]
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
PROJECT_NOT_FOUND 400
FORBIDDEN 400
PROJECT_SETTINGS_MISSING 400
REFERENCE_NOT_FOUND 400
NAME_REQUIRED 400
VALUE_NEGATIVE 400
CURRENCY_MISMATCH 400
BILLING_REFERENCE_NOT_ALLOWED 400
LINE_NOT_BILLABLE_TIME 400
SALES_ORDER_NOT_IN_SALES_ARRANGEMENT 400
RATE_CARD_ENTRY_REQUIRED 400
RATE_CARD_ENTRY_MISMATCH 400
BILL_RATE_REQUIRED 400
BILL_RATE_NOT_ALLOWED 400
UNIT_OF_MEASURE_LOCKED 400
BILLABLE_NOT_ALLOWED 400
SALES_ORDER_USED_BY_OTHER_PROJECT 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses