DevPortalPagoPA




Table of contents

How to retrieve pending service requests via API

In the API, the status In attesa di approvazione is identified as PENDING.

Case 1 — The subscriber requests their own Agreements in PENDING

Including the consumerIds parameter with your party's ID is useful (but not mandatory) to avoid retrieving PENDING agreements for which you are the producer.
Request
1GET /agreements
2    ?states=PENDING
3    &consumerIds=efea2507-08df-4a5d-b4bf-263763ae03ad
4    &offset=0
5    &limit=2
6
Response
1{
2  "results": [
3    {
4      "id": "4ed64879-2568-4117-9b34-2322cbcdf90d",
5      "eserviceId": "fd7d6c6b-c042-4d9c-926a-d5e26c815220",
6      "descriptorId": "419adb1c-8e0e-4225-97d9-24510a9a4aac",
7      "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
8      "consumerId": "efea2507-08df-4a5d-b4bf-263763ae03ad",
9      "state": "PENDING",
10      "createdAt": "2025-05-01T00:12:34Z",
11      "updatedAt": "2025-05-02T00:12:34Z"
12    },
13    {
14      "id": "77eb543f-8273-4dd4-b300-1d49b40e6f9d",
15      "eserviceId": "0c46fc70-9d1e-471f-a043-1b5f385fbb29",
16      "descriptorId": "6a25c4df-333d-4329-b68f-1799670d44f2",
17      "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
18      "consumerId": "efea2507-08df-4a5d-b4bf-263763ae03ad",
19      "state": "PENDING",
20      "createdAt": "2025-06-01T00:12:34Z",
21      "updatedAt": "2025-06-02T00:12:34Z"
22    }
23  ],
24  "pagination": {
25    "offset": 0,
26    "limit": 2,
27    "totalCount": 45
28  }
29}
30

Case 2 — The producer retrieves PENDING Agreements for their e-service

The producer can retrieve the list of PENDING agreements that require their approval.
Request
1GET /agreements
2    ?states=PENDING
3    &eserviceIds=2474f999-2448-4828-bfa6-3dd48168bb61
4    &offset=0
5    &limit=2
6
Response
1{
2  "results": [
3    {
4      "id": "4ed64879-2568-4117-9b34-2322cbcdf90d",
5      "eserviceId": "2474f999-2448-4828-bfa6-3dd48168bb61",
6      "descriptorId": "419adb1c-8e0e-4225-97d9-24510a9a4aac",
7      "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
8      "consumerId": "efea2507-08df-4a5d-b4bf-263763ae03ad",
9      "state": "PENDING",
10      "createdAt": "2025-05-01T00:12:34Z",
11      "updatedAt": "2025-05-02T00:12:34Z"
12    },
13    {
14      "id": "77eb543f-8273-4dd4-b300-1d49b40e6f9d",
15      "eserviceId": "2474f999-2448-4828-bfa6-3dd48168bb61",
16      "descriptorId": "6a25c4df-333d-4329-b68f-1799670d44f2",
17      "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
18      "consumerId": "a2521558-5b90-4835-bc8e-2ce535e45ba0",
19      "state": "PENDING",
20      "createdAt": "2025-06-01T00:12:34Z",
21      "updatedAt": "2025-06-02T00:12:34Z"
22    }
23  ],
24  "pagination": {
25    "offset": 0,
26    "limit": 2,
27    "totalCount": 35
28  }
29}
30

Case 3 — The producer retrieves PENDING Agreements for their e-service and a specific subscriber

The producer can get the PENDING agreement for one specific subscriber on their e-service.
Request
1GET /agreements
2    ?states=PENDING
3    &eserviceIds=2474f999-2448-4828-bfa6-3dd48168bb61
4    &consumerIds=7b2b1d1c-0232-4576-88c6-3ff5683cf8c0
5    &offset=0
6    &limit=2
7
Response
1{
2  "results": [
3    {
4      "id": "4ed64879-2568-4117-9b34-2322cbcdf90d",
5      "eserviceId": "2474f999-2448-4828-bfa6-3dd48168bb61",
6      "descriptorId": "419adb1c-8e0e-4225-97d9-24510a9a4aac",
7      "producerId": "90f45b0c-f63b-4a16-9352-80497ee88890",
8      "consumerId": "7b2b1d1c-0232-4576-88c6-3ff5683cf8c0",
9      "state": "PENDING",
10      "createdAt": "2025-05-01T00:12:34Z",
11      "updatedAt": "2025-05-02T00:12:34Z"
12    }
13  ],
14  "pagination": {
15    "offset": 0,
16    "limit": 2,
17    "totalCount": 1
18  }
19}
20

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