Labels Endpoints

Cette page est en cours de traduction. Elle sera mise à jour dès que son contenu sera disponible en français.


/api/partner/1.0/{product}/labels (GET)

Endpoint authentication

When adopting OAuth 2.0 as an authentication method, the below security requirements are needed in order to trigger this endpoint:

  • The user must fulfill the below security roles requirements; if he fails to obtain access to all the necessary security roles, an error 403: Insufficient privileges to execute this request is returned:

    • The user must acquire access to at least one of the following security roles; he needs to have access to the security role corresponding to the product included in the URL:

      • Tax – Access T1 Product

      • Tax – Access T2 Product

      • Tax – Access T3 Product

      • Tax – Access Forms Product

Endpoint description

Returns a list of labels for the product specified in the URL of the endpoint. The product (T1, T2, T3, TF) must be included in the URL.

Model

N/A

Properties

N/A

Examples

Request URL

https://mysite.cchifirm.ca/taxcan/api/partner/1.0/T1/labels

Request body

N/A

Response body

{

"result": [

{

"id": "415c4238-9117-d545-85b5-a6c5717bdba1",

"name": "None",

"mode": "Production",

"active": true

},

{

"id": "f3f0d1c4-ef04-7f4f-906d-b04f8e5b9372",

"name": "Planner",

"mode": "Non-Production",

"active": true

},

{

"id": "9b41d224-9328-a04c-a2a2-c41b42ccb2d9",

"name": "Submitted",

"mode": "Production",

"active": false

},

{

"id": "3833e08e-adb7-41a8-81e7-18d89368686b",

"name": "Test",

"mode": "Non-Production",

"active": false

}

],

"errors": []

}

/api/partner/1.0/{product}/documents/labels (PUT)

Endpoint authentication

When adopting OAuth 2.0 as an authentication method, the below security requirements are needed in order to trigger this endpoint:

  • The user must fulfill the below security roles requirements; if he fails to obtain access to all the necessary security roles, an error 403: Insufficient privileges to execute this request is returned:

    • The user must acquire access to at least one of the following security roles; he needs to have access to the security role corresponding to the product included in the URL:

      • Tax – Access T1 Product

      • Tax – Access T2 Product

      • Tax – Access T3 Product

      • Tax – Access Forms Product

  • This endpoint validates against the user’s contact security and document visibility. If the user does not have access to the document provided in the request body or the contact associated to this document, an error 404: Resource not found in the system is returned.

Endpoint description

Assigns a label to a document or a batch of documents for the product specified in the URL of the endpoint. The product (T1, T2, T3, TF) must be included in the URL.

Model

{

"labelId": "string",

"documentIds": [

"string"

]

}

Properties

 

labelId : The ID of the label to be associated to the document(s). This ID can be retrieved by creating a GET request using the labels endpoint.

documentIds: The GUID(s) array of documents can be retrieved by creating a get request using the Documents endpoint.

Examples

Request URL

https://mysite.cchifirm.ca/taxcan/api/partner/1.0/T1/documents/labels

Request body

{

"labelId": "e45de955-3d82-479b-82f7-f9a73432a4f7",

"documentIds": [

"353526cc-c7cf-4c97-9340-1237c025ce89",

"2ab8705b-c6d0-4874-ad5a-b25f4c9a4b3a"

]

}

Response body

{

"errors": []

}