Skip to main content

Produits

Lister les produits

GET /api/products/
[
{
"uuid": "ac87a79f-792a-4c68-9ad3-2e04b417078e",
"name": "Adhésion Asso",
"short_description": null,
"long_description": null,
"terms_and_conditions_document": null,
"publish": true,
"img": "http://billetistan.django-local.org/media/images/300_CQusv1A.jpg",
"categorie_article": "A",
"send_to_cashless": true,
"prices": [
{
"uuid": "989f53f7-7241-4b56-8c85-410edda76d2f",
"short_description": null,
"long_description": null,
"name": "Tarif solidaires",
"prix": 10.0,
"vat": "NA",
"stock": null,
"max_per_user": 10,
"subscription_type": "Y",
"product": "ac87a79f-792a-4c68-9ad3-2e04b417078e",
"adhesion_obligatoire": null
},
{
"uuid": "9a719f4e-2d14-4e5c-8963-14d9d726bd79",
"short_description": null,
"long_description": null,
"name": "Plein Tarif",
"prix": 20.0,
"vat": "NA",
"stock": null,
"max_per_user": 10,
"subscription_type": "Y",
"product": "ac87a79f-792a-4c68-9ad3-2e04b417078e",
"adhesion_obligatoire": null
}
]
}
]

Lister les tarifs

POST /api/prices/
[
{
"uuid": "e4980a38-e8ec-4bca-ad8c-59f9a64646c2",
"product": "bd8bcd60-0a5f-4fdb-bdb1-1fa12392d56a",
"name": "Par mois",
"short_description": "Payez au mois",
"long_description": null,
"prix": 30.0,
"vat": "NA",
"stock": null,
"max_per_user": 10,
"adhesion_obligatoire": null,
"subscription_type": "M"
},
{
"uuid": "6c2456d7-585c-4e33-9a4d-27ff38932481",
"product": "bd8bcd60-0a5f-4fdb-bdb1-1fa12392d56a",
"name": "A l'année Y",
"short_description": "Payez à l'année",
"long_description": null,
"prix": 360.0,
"vat": "NA",
"stock": null,
"max_per_user": 10,
"adhesion_obligatoire": null,
"subscription_type": "Y"
}
]

Création de produit

POST /api/products/
ItemtypeRequisExemple
nametextYBillet
categorie_articletextYB
send_to_cashlessbooleanNfalse
imgbinaryN/home/jojo/img.jpg

send_to_cashless : Pour indiquer une adhésion associative enregistrée sur carte cashless TiBillet. Un seul produit possible par instance.

Type de produits possible

TypeString
BilletB
Pack d'objetsP
Recharge cashlessR
VetementT
MerchandasingM
Abonnement / AdhésionA
Gratuit / FreeF

Création de tarif

POST /api/prices/
ItemtypeRequisExemple
productintYuuid4
nametextYDemi tarif
prixdecimalY5
vatdecimalNNA
max_per_serintN10
stockintN300
subscription_typetextNNull / Y / M
adhesion_obligatoiretextNuuid4 product

subscription_type

Y for years M for Month

adhesion_obligatoire

Exemple : Tarif abonné disponible uniquement si utilisateur connecté et ayant souscrit à l'abonnement correspondant.