docs(arcadia): add brand queries, HTTP API endpoint, and CLI usage in README
This commit is contained in:
parent
4302b89d88
commit
e60327d286
1 changed files with 62 additions and 0 deletions
|
|
@ -97,3 +97,65 @@ LEFT JOIN METAP.META_UTIL u_cmcl ON i.UTIL_CMCL = u_cmcl.COD_UTIL
|
|||
LEFT JOIN METAP.META_UTIL u_mkt ON i.UTIL_MKT = u_mkt.COD_UTIL
|
||||
LEFT JOIN METAP.META_UTIL u_qual ON i.UTIL_QUAL = u_qual.COD_UTIL;
|
||||
```
|
||||
|
||||
### D. Référentiel des Marques (`REFP.MARQUE`)
|
||||
|
||||
#### Requête SQL Oracle de référence
|
||||
```sql
|
||||
SELECT
|
||||
m.COD_MARQ AS id,
|
||||
m.LIB_MARQ AS name,
|
||||
m.COD_RGPT_MARQ AS rgpt_code,
|
||||
m.COMMENTAIRE AS comment,
|
||||
m.TYPE_MARQUE AS type,
|
||||
m.SOCIETE AS societe,
|
||||
m.MARQUE_PROPRE AS is_own_brand,
|
||||
m.GLN_SOC AS gln
|
||||
FROM REFP.MARQUE m
|
||||
ORDER BY m.COD_MARQ ASC;
|
||||
```
|
||||
|
||||
#### Requête HTTP API
|
||||
|
||||
```http
|
||||
GET /api/v1/brands
|
||||
Authorization: Bearer <API_TOKEN>
|
||||
Accept: application/json
|
||||
```
|
||||
|
||||
**Exemple avec cURL :**
|
||||
```bash
|
||||
curl -X GET "https://api.arcadia.ldc.fr/api/v1/brands" \
|
||||
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
||||
-H "Accept: application/json"
|
||||
```
|
||||
|
||||
**Exemple de réponse JSON (200 OK) :**
|
||||
```json
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "LE GAULOIS"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "MAITRE COQ"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "LOUÉ"
|
||||
}
|
||||
],
|
||||
"links": {
|
||||
"self": "http://localhost/api/v1/brands"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Commande CLI Artisan
|
||||
|
||||
```bash
|
||||
php artisan arcadia:brand:list
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue