DevPortalPagoPA




Table of contents

How to approve a pending service request via API

On the API, the state In attesa di approvazione (Waiting for approval) in the context of an Agreement is identified as PENDING.
An Agreement in PENDING state requires one or more actions by the producer of the e-service.

Prerequisites

Case 1 — Manual approval required

Use this when activation of an Agreement requires manual approval by the producer. The producer can choose manual approval when defining a version of the e-service. For more information, see the dedicated section.
Request
1POST /agreements/4ed64879-2568-4117-9b34-2322cbcdf90d/approve
2
3{}
4
Response
1{
2    "id": "4ed64879-2568-4117-9b34-2322cbcdf90d",
3    "eserviceId": "fd7d6c6b-c042-4d9c-926a-d5e26c815220",
4    "descriptorId": "419adb1c-8e0e-4225-97d9-24510a9a4aac",
5    "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
6    "consumerId": "efea2507-08df-4a5d-b4bf-263763ae03ad",
7    "state": "ACTIVE",
8    "createdAt": "2025-06-01T00:12:34Z",
9    "updatedAt": "2025-06-02T00:12:34Z"
10}
11

Case 2 — Verified attribute required

Use this if the e-service requires the consumer to have one or more verified attributes that are not yet assigned.

Step 1: Assign a verified attribute to the consumer

The assignment requires reference to the Agreement for which the attribute is needed.
Request
1POST /tenants/172c89fe-62d1-4f3e-82bc-1ff034a85567/verifiedAttributes
2
3{
4    "id": "727e9cc7-de40-4c03-8f37-e604b8de32f4",
5    "agreementId": "4ed64879-2568-4117-9b34-2322cbcdf90d"
6}
7

Step 2: Approval of the Agreement by the producer

The producer can now confirm activation of the Agreement.
Request
1POST /agreements/4ed64879-2568-4117-9b34-2322cbcdf90d/approve
2
3{}
4
Response
1{
2    "id": "4ed64879-2568-4117-9b34-2322cbcdf90d",
3    "eserviceId": "fd7d6c6b-c042-4d9c-926a-d5e26c815220",
4    "descriptorId": "419adb1c-8e0e-4225-97d9-24510a9a4aac",
5    "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
6    "consumerId": "efea2507-08df-4a5d-b4bf-263763ae03ad",
7    "state": "ACTIVE",
8    "createdAt": "2025-06-01T00:12:34Z",
9    "updatedAt": "2025-06-02T00:12:34Z"
10}
11

Need help?

Open a ticket using the dedicated feature inside your Reserved Area

Tell us what you think

To report problems or give feedback, you can open a report on GitHub