Skip to content

Commit a5efc42

Browse files
committed
Added use case for cnetp
1 parent e903e29 commit a5efc42

File tree

7 files changed

+237
-1
lines changed

7 files changed

+237
-1
lines changed

payloads/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ génère une payload par défaut basée sur la spécification OpenAPI associée.
5656
* 3 derniers bilans annuels (`/v3/banque_de_france/unites_legales/{siren}/bilans`)
5757
* Qualiopi & habilitations France compétences (`/v3/carif_oref/etablissements/{siret}/certifications_qualiopi_france_competences`)
5858
* [Certificat cotisations CIBTP](api_entreprise_v3_cibtp_attestation_cotisations_conges_payes_chomage_intemperies) (`/v3/cibtp/etablissements/{siret}/attestation_cotisations_conges_payes_chomage_intemperies`)
59-
* Certificat cotisations CNETP (`/v3/cnetp/unites_legales/{siren}/attestation_cotisations_conges_payes_chomage_intemperies`)
59+
* [Certificat cotisations CNETP](api_entreprise_v3_cnetp_attestation_cotisations_conges_payes_chomage_intemperies) (`/v3/cnetp/unites_legales/{siren}/attestation_cotisations_conges_payes_chomage_intemperies`)
6060
* Subventions des associations (`/v3/data_subvention/associations/{siren_or_siret_or_rna}/subventions`)
6161
* Immatriculation EORI (`/v3/douanes/etablissements/{siret_or_eori}/immatriculations_eori`)
6262
* [Attestation fiscale](api_entreprise_v3_dgfip_attestations_fiscales) (`/v3/dgfip/unites_legales/{siren}/attestation_fiscale`)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
params:
3+
siren: '130025265'
4+
status: 200
5+
description: 'Appel réussi'
6+
payload: |-
7+
{
8+
"data": {
9+
"document_url": "https://raw.githubusercontent.com/etalab/siade_staging_data/refs/heads/develop/payloads/api_entreprise_v3_cnetp_attestation_cotisations_conges_payes_chomage_intemperies/test_cnetp_certificat.pdf",
10+
"expires_in": 600
11+
},
12+
"links": {
13+
},
14+
"meta": {
15+
}
16+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
params:
3+
siren: '844451564'
4+
status: 404
5+
description: 'Établissement non trouvé'
6+
payload: |-
7+
{
8+
"errors": [
9+
{
10+
"code": "38003",
11+
"title": "Entité non trouvée",
12+
"detail": "L'identifiant indiqué n'existe pas, n'est pas connu ou ne comporte aucune information pour cet appel. Veuillez vérifier que l'identifiant correspond au périmètre couvert par l'API.",
13+
"meta": {
14+
"provider": "CNETP"
15+
}
16+
}
17+
]
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
params:
3+
siren: '204594462'
4+
status: 504
5+
description: 'Intermédiaire hors-délai'
6+
payload: |-
7+
{
8+
"errors": [
9+
{
10+
"code": "38002",
11+
"title": "Intermédiaire hors-délai",
12+
"detail": "Temps d’attente d’une réponse du fournisseur de données écoulé.",
13+
"meta": {
14+
"provider": "CNETP"
15+
}
16+
}
17+
]
18+
}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Certificat cotisations CNETP
2+
* [200.yaml](200.yaml)
3+
4+
Status `200`
5+
6+
Appel réussi
7+
8+
<details><summary>Paramètres</summary>
9+
<p>
10+
11+
```json
12+
{
13+
"siren": "130025265"
14+
}
15+
```
16+
17+
</p>
18+
</details>
19+
20+
<details><summary>Réponse API</summary>
21+
<p>
22+
23+
```json
24+
{
25+
"data": {
26+
"document_url": "https://raw.githubusercontent.com/etalab/siade_staging_data/refs/heads/develop/payloads/api_entreprise_v3_cnetp_attestation_cotisations_conges_payes_chomage_intemperies/test_cnetp_certificat.pdf",
27+
"expires_in": 600
28+
},
29+
"links": {
30+
},
31+
"meta": {
32+
}
33+
}
34+
```
35+
36+
</p>
37+
</details>
38+
39+
<details><summary>Commande cURL</summary>
40+
<p>
41+
42+
```bash
43+
curl -H "Authorization: Bearer $token" \
44+
-G -d 'recipient=10000001700010' -d 'context=Contexte+de+la+requ%C3%AAte' -d 'object=Objet+de+la+requ%C3%AAte' \
45+
--url "https://staging.entreprise.api.gouv.fr/v3/cnetp/unites_legales/130025265/attestation_cotisations_conges_payes_chomage_intemperies"
46+
```
47+
48+
</p>
49+
</details>
50+
* [404.yaml](404.yaml)
51+
52+
Status `404`
53+
54+
Établissement non trouvé
55+
56+
<details><summary>Paramètres</summary>
57+
<p>
58+
59+
```json
60+
{
61+
"siren": "844451564"
62+
}
63+
```
64+
65+
</p>
66+
</details>
67+
68+
<details><summary>Réponse API</summary>
69+
<p>
70+
71+
```json
72+
{
73+
"errors": [
74+
{
75+
"code": "38003",
76+
"title": "Entité non trouvée",
77+
"detail": "L'identifiant indiqué n'existe pas, n'est pas connu ou ne comporte aucune information pour cet appel. Veuillez vérifier que l'identifiant correspond au périmètre couvert par l'API.",
78+
"meta": {
79+
"provider": "CNETP"
80+
}
81+
}
82+
]
83+
}
84+
```
85+
86+
</p>
87+
</details>
88+
89+
<details><summary>Commande cURL</summary>
90+
<p>
91+
92+
```bash
93+
curl -H "Authorization: Bearer $token" \
94+
-G -d 'recipient=10000001700010' -d 'context=Contexte+de+la+requ%C3%AAte' -d 'object=Objet+de+la+requ%C3%AAte' \
95+
--url "https://staging.entreprise.api.gouv.fr/v3/cnetp/unites_legales/844451564/attestation_cotisations_conges_payes_chomage_intemperies"
96+
```
97+
98+
</p>
99+
</details>
100+
* [504.yaml](504.yaml)
101+
102+
Status `504`
103+
104+
Intermédiaire hors-délai
105+
106+
<details><summary>Paramètres</summary>
107+
<p>
108+
109+
```json
110+
{
111+
"siren": "204594462"
112+
}
113+
```
114+
115+
</p>
116+
</details>
117+
118+
<details><summary>Réponse API</summary>
119+
<p>
120+
121+
```json
122+
{
123+
"errors": [
124+
{
125+
"code": "38002",
126+
"title": "Intermédiaire hors-délai",
127+
"detail": "Temps d’attente d’une réponse du fournisseur de données écoulé.",
128+
"meta": {
129+
"provider": "CNETP"
130+
}
131+
}
132+
]
133+
}
134+
```
135+
136+
</p>
137+
</details>
138+
139+
<details><summary>Commande cURL</summary>
140+
<p>
141+
142+
```bash
143+
curl -H "Authorization: Bearer $token" \
144+
-G -d 'recipient=10000001700010' -d 'context=Contexte+de+la+requ%C3%AAte' -d 'object=Objet+de+la+requ%C3%AAte' \
145+
--url "https://staging.entreprise.api.gouv.fr/v3/cnetp/unites_legales/204594462/attestation_cotisations_conges_payes_chomage_intemperies"
146+
```
147+
148+
</p>
149+
</details>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Titre,Description,Paramètres,Status,Réponse
2+
,Appel réussi,"{""siren"":""130025265""}",200,"{
3+
""data"": {
4+
""document_url"": ""https://raw.githubusercontent.com/etalab/siade_staging_data/refs/heads/develop/payloads/api_entreprise_v3_cnetp_attestation_cotisations_conges_payes_chomage_intemperies/test_cnetp_certificat.pdf"",
5+
""expires_in"": 600
6+
},
7+
""links"": {
8+
},
9+
""meta"": {
10+
}
11+
}"
12+
,Établissement non trouvé,"{""siren"":""844451564""}",404,"{
13+
""errors"": [
14+
{
15+
""code"": ""38003"",
16+
""title"": ""Entité non trouvée"",
17+
""detail"": ""L'identifiant indiqué n'existe pas, n'est pas connu ou ne comporte aucune information pour cet appel. Veuillez vérifier que l'identifiant correspond au périmètre couvert par l'API."",
18+
""meta"": {
19+
""provider"": ""CNETP""
20+
}
21+
}
22+
]
23+
}"
24+
,Intermédiaire hors-délai,"{""siren"":""204594462""}",504,"{
25+
""errors"": [
26+
{
27+
""code"": ""38002"",
28+
""title"": ""Intermédiaire hors-délai"",
29+
""detail"": ""Temps d’attente d’une réponse du fournisseur de données écoulé."",
30+
""meta"": {
31+
""provider"": ""CNETP""
32+
}
33+
}
34+
]
35+
}"

0 commit comments

Comments
 (0)