# Ofertar

10 rute, cu exemplu de cerere pentru fiecare.

Adresa de bază: `https://app.ilustromania.com/nucleu`

## Modulul `oferte`

### GET /v1/oferte

Acces: `sesiune`

**Ofertele mele**

Ofertele omului logat în firmă, cu numărul lor.

```bash
curl https://app.ilustromania.com/nucleu/v1/oferte \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE"
```

### POST /v1/oferte

Acces: `sesiune` · acceptă `Idempotency-Key`

**Creează o ofertă**

Creează o ofertă nouă; răspunde 201 cu oferta.

```bash
curl -X POST https://app.ilustromania.com/nucleu/v1/oferte \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
  -H "Content-Type: application/json" \
  -d '{ … }'
```

### DELETE /v1/oferte/{id}

Acces: `sesiune`

**Șterge oferta**

Șterge oferta `:id`; 204, sau 404 dacă nu există.

Parametri de cale:

| Nume | Tip | Descriere |
| --- | --- | --- |
| `id` | `string` | identificatorul resursei |

```bash
curl -X DELETE https://app.ilustromania.com/nucleu/v1/oferte/{id} \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE"
```

### GET /v1/oferte/{id}

Acces: `sesiune`

**O ofertă**

Oferta `:id`; 404 dacă nu e a omului.

Parametri de cale:

| Nume | Tip | Descriere |
| --- | --- | --- |
| `id` | `string` | identificatorul resursei |

```bash
curl https://app.ilustromania.com/nucleu/v1/oferte/{id} \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE"
```

### PUT /v1/oferte/{id}

Acces: `sesiune`

**Salvează oferta**

Rescrie oferta `:id`; 404 dacă nu există.

Parametri de cale:

| Nume | Tip | Descriere |
| --- | --- | --- |
| `id` | `string` | identificatorul resursei |

```bash
curl -X PUT https://app.ilustromania.com/nucleu/v1/oferte/{id} \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
  -H "Content-Type: application/json" \
  -d '{ … }'
```

### POST /v1/oferte/{id}/duplica

Acces: `sesiune` · acceptă `Idempotency-Key`

**Duplică oferta**

Creează o copie a ofertei `:id`; 201 cu copia, 404 dacă originalul nu există.

Parametri de cale:

| Nume | Tip | Descriere |
| --- | --- | --- |
| `id` | `string` | identificatorul resursei |

```bash
curl -X POST https://app.ilustromania.com/nucleu/v1/oferte/{id}/duplica \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
  -H "Content-Type: application/json" \
  -d '{ … }'
```

### POST /v1/oferte/{id}/status

Acces: `sesiune`

**Schimbă statusul ofertei**

Setează statusul ofertei `:id`; 404 dacă nu există.

Parametri de cale:

| Nume | Tip | Descriere |
| --- | --- | --- |
| `id` | `string` | identificatorul resursei |

```bash
curl -X POST https://app.ilustromania.com/nucleu/v1/oferte/{id}/status \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
  -H "Content-Type: application/json" \
  -d '{ … }'
```

## Modulul `catalog`

### GET /v1/catalog/sabloane

Acces: `sesiune`

**Șabloanele de pachete**

Lista șabloanelor de pachete din catalog.

```bash
curl https://app.ilustromania.com/nucleu/v1/catalog/sabloane \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE"
```

### GET /v1/catalog/servicii

Acces: `sesiune`

**Serviciile din catalog**

Lista serviciilor firmei din catalog.

```bash
curl https://app.ilustromania.com/nucleu/v1/catalog/servicii \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE"
```

### POST /v1/catalog/servicii

Acces: `sesiune`

**Adaugă un serviciu**

Creează un serviciu în catalogul firmei (201).

```bash
curl -X POST https://app.ilustromania.com/nucleu/v1/catalog/servicii \
  -H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
  -H "Content-Type: application/json" \
  -d '{ … }'
```
