Skip to main content

Documents API - Assignment Documents

GET, POST, DELETE and PATCH requests to the Document endpoints are supported. Requests made to the Document endpoints require a Document ID so that Assignment Documents can be retrieved on an individu

Updated over 2 weeks ago

GET, POST, DELETE and PATCH requests to the Document endpoints are supported. Requests made to the Document endpoints require a Document ID so that Assignment Documents can be retrieved on an individual basis.

GET requests

GET rights to a subset of fields on the related parent objects have been included in the subscription, which enables a request to include the Document IDs that exist for that entity in a relationship. For example, a request to the Employee endpoint will return the related Employee Document IDs as seen below:

mceclip7.png

mceclip4.png

Note that there is a separate object in the response that includes the ID of each Employee Document for the Employee. These are the IDs to be used to build a request to retrieve Documents. The same behavior will be available for the parent endpoints:

  • Assignment

  • Assignment Dependent

  • Assignment Dependent Passport

  • Employee

  • Employee Passport

  • Spouse/Domestic Partner

  • Spouse/Domestic Partner Passport

The available fields for these endpoints are limited compared to the same endpoints in the People API and have been included to provide context about the Documents being pulled.

POST Requests

POST requests can be utilized to send Documents into AssignmentPro. In order to correctly associate a Document to a parent record, like an Employee or an Assignment, the parent must be included as a relationship in the request:

mceclip8.png

mceclip3.png

After the above JSON was sent to the Employee Document endpoint, this is how it appears in AssignmentPro in the Documents grid on the Employee screen.

mceclip9.png

PATCH Requests

PATCH requests can be utilized to update information in AssignmentPro. So that API Subscribers can create or update the parent records of Passport Documents, POST and PATCH requests are supported in the Assignment Document API Subscription.

Available Endpoints

  • Assignment: supports GET

  • Assignment Document: supports GET, POST, DELETE

    • POST requests require the Assignment as a relationship

  • Assignment Dependent: supports GET

  • Assignment Dependent Document: supports GET, POST, DELETE

    • POST requests require an Assignment Dependent ID as a relationship

  • Assignment Dependent Passport: supports GET, POST, PATCH

  • Assignment Dependent Passport Document: supports GET, POST, DELETE

    • POST requests require an Assignment Dependent Passport ID as a relationship

    • POST requests require the correct Document Type ID for Assignment Dependent Passport. If not provided, the Document Type ID will be automatically inferred by the API. An error message containing the correct value to use will be returned when an incorrect value is provided

  • Spouse/Domestic Partner: supports GET

  • Spouse/Domestic Partner Document: supports GET, POST, DELETE

    • POST requests require a Spouse/Domestic Partner ID as a relationship

  • Spouse/Domestic Partner Passport: supports GET, POST, PATCH

  • Spouse/Domestic Partner Passport Document: supports GET, POST, DELETE

    • POST requests require a Spouse/Domestic Partner Passport ID as a relationship

    • POST requests require the correct Document Type ID for Spouse/Domestic Partner Passport. If not provided, the Document Type ID will be automatically inferred by the API. An error message containing the correct value to use will be returned when an incorrect value is provided

  • Employee: supports GET

  • Employee Document: supports GET, POST, DELETE

    • POST requests require an Employee ID as a relationship

  • Employee Passport: supports GET, POST, PATCH

  • Employee Passport Document: supports GET, POST, DELETE

    • POST requests require an Employee Passport ID as a relationship

    • POST requests require the correct Document Type ID for Employee Passport. If not provided, the Document Type ID will be automatically inferred by the API. An error message containing the correct value to use will be returned when an incorrect value is provided

Requests to all Document endpoints will automatically associate the Documents to the correct Page.

Did this answer your question?