Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api) Pouvoir chercher les structures par SIREN #1074

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

raphodn
Copy link
Contributor

@raphodn raphodn commented Feb 8, 2024

Quoi ?

Autre demande d'API Entreprise (après la #955)

Avoir une URL pour récupérer les structures par siren (on avait déjà par siret)

  • /siae/siren/<siren>
  • siren = 9 caractères, siret = 13

Copy link
Contributor

@SebastienReuiller SebastienReuiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG ! Juste deux petites remarques 😉

url = reverse("api:siae-retrieve-by-siren", args=["444444444"])
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
# self.assertEqual(type(response.data), list)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu as laissé des lignes commentées 😉

@classmethod
def setUpTestData(cls):
SiaeFactory(name="Une structure", siret="12312312312345", department="38")
SiaeFactory(name="Une autre structure", siret="22222222222222", department="69")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'aurai peut-être changé les 5 derniers chiffres pour avoir des SIRET différents sur le même SIREN. Je pense que c'est plus réaliste.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je vais faire ca dans une petite PR séparée 👌
et améliorer un peu cet endpoint par siret

@raphodn raphodn changed the title API : pouvoir chercher les structures par SIREN feat(api) Pouvoir chercher les structures par SIREN Feb 14, 2024
@raphodn raphodn force-pushed the raphodn/api-siae-by-siren branch from 81bfbd0 to 5a39ef8 Compare February 14, 2024 08:53
@raphodn raphodn merged commit 3ad2c2f into master Feb 14, 2024
4 checks passed
@raphodn raphodn deleted the raphodn/api-siae-by-siren branch February 14, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants