Download OpenAPI specification:Download
This is the internal API resource server documentation for the PizziPayment. You can find out more about Pizzi here.
Pay.
Payment's informations.
| transaction_id required | number |
{- "transaction_id": 2
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Create shop items from a list of items.
List of items to create.
required | Array of objects (shop_item) non-empty Array of shop items to create. |
{- "items": [
- {
- "name": "red wheelbarrow",
- "price": 999900,
- "category": "Tools",
- "color": "#000000"
}, - {
- "name": "cultivator",
- "price": 3460000,
- "category": "Tools",
- "color": "#000000"
}
]
}{- "items": [
- {
- "id": 1,
- "name": "red wheelbarrow",
- "price": 999900,
- "category": "Tools",
- "color": "#000000"
}, - {
- "id": 2,
- "name": "cultivator",
- "price": 3460000,
- "category": "Tools",
- "color": "#000000"
}
]
}Get a list of shop items by page.
| page | integer >= 1 Default: 1 Page number. |
| nb_items | integer >= 1 Default: 25 Number of item(s) per page |
| query | string Return only results with an occurence of |
| sort_by | string Default: "name" Enum: "date" "name" "price" Sort by:
|
| order | string Default: "asc" Enum: "asc" "desc" Order:
|
{- "items": [
- {
- "id": 1,
- "name": "red wheelbarrow",
- "price": 999900,
- "category": "Tools",
- "color": "#000000"
}, - {
- "id": 2,
- "name": "cultivator",
- "price": 3460000,
- "category": "Tools",
- "color": "#000000"
}
]
}Update the shop item related to the id in path. Notice that every field in the request's body are optional.
| id required | integer Id of the shop item. |
Item's information.
| name required | string Product/service's name. |
| price required | integer (types_price) Price stored thousandth of euro. |
| category | string |
| color | string |
{- "name": "Shovel",
- "price": 450000,
- "category": "Tools",
- "color": "#000000"
}{- "id": 3,
- "name": "Shovel",
- "price": 450000,
- "category": "Tools",
- "color": "#000000"
}Returns the informations related to the given token.
Shop's info example
{- "id": 2,
- "email": "bernard.fortune@example.com",
- "name": "Argent",
- "phone": "0652076382",
- "address": "13 rue de la ville Ville",
- "zipcode": 25619,
- "siret": "32974655600060",
- "description": "On vend des trucs.",
}Update shop informations related to the given token. Note that every field in the request's body is optional.
Update shop body.
| description | string Shop's description. |
| website | string Shop's website. |
string Shop's instagram page. | |
string Shop's twitter account. | |
string Shop's facebook page. |
{- "description": "We sell things,",
}Shop's info example
{- "id": 2,
- "email": "bernard.fortune@example.com",
- "name": "Argent",
- "phone": "0652076382",
- "address": "13 rue de la ville Ville",
- "zipcode": 25619,
- "siret": "32974655600060",
- "description": "On vend des trucs.",
}Create a Pizzi shop account.
User's informations.
| name required | string Shop's name. |
required | object Shop's address information. |
| email required | string Shop's email. |
| phone required | string Shop's phone number. |
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
| siret required | string Shop's siret. |
{- "name": "Voitukle",
- "place": {
- "address"": "13 rue de la ville",
- "city"": "Ville",
- "zipcode"": 25619
}, - "email": "shop@example.com",
- "phone": "+33 6 12 34 56 78",
- "password": "Testeee8!eee",
- "siret": "12345678912345"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Delete the Pizzi shop account related to the given token.
Shop's password.
| password | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
{- "password": "Valid_passw0rd"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Update shop's email.
Shop's new email
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
| new_email required | string |
New email
{- "password": "Valid_passw0rd",
- "new_email": "nicolas.porte@example.com"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Replace shop's password.
Shop's new password
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
| new_password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
Change password
{- "password": "Old_passw0rd",
- "new_password": "New_passw0rd"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}List the shop's receipts
| filter | string (filter) Enum: "latest" "oldest" "price_ascending" "price_descending" Example: filter=latest The order in which the elements should be returned. |
| from | string Example: from=2018-03-20T09:12:28Z |
| to | string Example: to=2018-03-20T09:12:28Z |
[- {
- "receipt_id": 0,
- "date": "21/09/2021",
- "total_ttc": 1234000
}
]Get a receipt's details
| receipt_id required | number The receipt's id |
{- "products": [
- {
- "id": 12,
- "product_name": "Outer Wilds",
- "quantity": 1,
- "unit_price": 174900,
- "tva_percentage": 20,
- "warranty": "18/06/2022",
- "eco_tax": 0,
- "discount": 0
}
], - "payment_type": "card",
- "creation_date": "18/06/2020",
- "total_ht": 174900,
- "total_ttc": 209880
}Create a transaction.
The transaction's contents.
| tva_percentage | number The sales tax percentage |
| total_price | integer (types_price) Price stored thousandth of euro. |
| payment_method | string (types_payment_method) Enum: "card" "cash" "cheque" "unassigned" The payment method |
Array of objects The transaction's shop items |
{- "tva_percentage": 20,
- "total_price": 278900,
- "payment_method": "card",
- "items": [
- {
- "shop_item_id": 0,
- "discount": 0,
- "eco_tax": 0,
- "quantity": 1,
- "warranty": "non"
}, - {
- "shop_item_id": 1,
- "discount": 0,
- "eco_tax": 0,
- "quantity": 1,
- "warranty": "non"
}
]
}{- "id": 1,
- "token": "Ceciestuntoken"
}Set shop's avatar.
| avatar | string <binary> The image in binary format |
{ "avatar": "An image" }
{- "avatar_id": 435
}Returns the informations related to the given token.
User's info example
{- "id": 1,
- "firstname": "Louis de Funes",
- "surname": "Loulou",
- "address": "62 rue de l'église",
- "zipcode": 92400,
- "avatar_id": 324
}Create a Pizzi user account.
User's informations.
| name required | string |
| surname required | string |
| email required | string |
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
required | object |
{- "name": "Valérie Debout",
- "surname": "Valoche",
- "email": "valerie.debout@example.com",
- "password": "Testeee8!eee",
- "place": {
- "address": "238 rue de Vaugirard",
- "city": "Bordeaux",
- "zipcode": 33000
}
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Delete the Pizzi user account related to the given token.
User's password.
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
{- "password": "Valid_passw0rd"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Update the Pizzi user account related to the given token. Notice that every items in the request's body are optionals. However, if you try to update a place, you'll need the place.address and the place.city correctly filled.
User's information.
| name | string |
| surname | string |
object |
{- "name": "Louis de Funes",
- "surname": "Loulou",
- "place": {
- "address": "62 rue de l'église",
- "city": "Courbevoie",
- "zipcode": 92400
}
}User's info example
{- "id": 1,
- "firstname": "Louis de Funes",
- "surname": "Loulou",
- "address": "62 rue de l'église",
- "zipcode": 92400,
- "avatar_id": 324
}Update user's email.
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
| new_email required | string |
New email
{- "password": "Valid_passw0rd",
- "new_email": "nicolas.porte@example.com"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Replace user's password.
User's new password
| password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
| new_password required | string (types_password) >= 12 characters A string longer than 12 characters with at least a number, an upper case, a lower case and a special character ( |
Change password
{- "password": "Old_passw0rd",
- "new_password": "New_passw0rd"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}List user's receipts with a filter.
| filter | string (filter) Enum: "latest" "oldest" "price_ascending" "price_descending" Example: filter=latest The order in which the elements should be returned. |
| query | string Example: query=steam |
| from | string Example: from=2018-03-20T09:12:28Z |
| to | string Example: to=2018-03-20T09:12:28Z |
[- {
- "receipt_id": 0,
- "shop_name": "shop",
- "shop_avatar_id": 987,
- "date": "21/09/2021",
- "total_ttc": 1234000
}
]Get a receipt's details
| receipt_id required | number Example: 4 The receipt's id |
{- "vendor": {
- "avatar_id": 9823,
- "name": "Steam",
- "place": {
- "street": "Rue",
- "city": "Ville",
- "postal_code": 12345
}, - "siret": "12345678912345",
- "shop_number": "00 00 00 00 00"
}, - "products": [
- {
- "product_name": "Outer Wilds",
- "quantity": 1,
- "unit_price": 174900,
- "tva_percentage": 20,
- "warranty": "18/06/2022",
- "eco_tax": 0,
- "discount": 0
}
], - "payment_type": "card",
- "creation_date": "18/06/2020",
- "total_ht": 174900,
- "total_ttc": 209900
}Self assign a transaction.
The transaction's id and the required token
| id required | number |
| token required | string |
{- "id": 12345,
- "token": "token"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Set user's avatar.
| avatar | string <binary> The image in binary format |
{ "avatar": "An image" }
{- "avatar_id": 435
}Everything about transactions. We call transaction the virtual object describing a contract between a user and a shop.
Retrieve owner's transactions by specifying a "state"
| state | string Enum: "pending" "failed" "validated" Transactions' state |
[- {
- "id": 21344,
- "receipt_id": 1203,
- "user_id": null,
- "shop_id": 12323,
- "state": "pending",
- "payment_method": "unassigned",
- "created_at": "2022-05-21T22:31:01.992Z",
- "updated_at": null
}
]Create a pending transaction
Transaction's informations.
| receipt_id required | number |
| user_id | number or null |
| shop_id required | number |
| payment_method required | string (types_payment_method) Enum: "card" "cash" "cheque" "unassigned" The payment method |
{- "receipt_id": 1203,
- "user_id": null,
- "shop_id": 12323,
- "payment_method": "unassigned"
}{- "id": 21344,
- "receipt_id": 1203,
- "user_id": null,
- "shop_id": 12323,
- "state": "pending",
- "payment_method": "unassigned",
- "created_at": "2022-05-21T22:31:01.992Z",
- "updated_at": null
}Link a transaction to a user.
| id required | number Transaction's id |
User's id
| user_id required | number |
{- "user_id": 32
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Update payment method registered for the transaction.
| id required | number Transaction's id |
Payment method
| payment_method required | string (types_payment_method) Enum: "card" "cash" "cheque" "unassigned" The payment method |
{- "payment_method": "card"
}{- "source": "/source",
- "message": "invalid `user_id` field"
}Get all product return certificates associated to a receipt's id.
| receipt_id required | number The receipt's id |
[- {
- "id": 1,
- "receipt_item_id": 12,
- "quantity": 2,
- "reason": "C'est cassé.",
- "return_date": "2022-08-13T16:17:39.278Z"
}, - {
- "id": 2,
- "receipt_item_id": 4,
- "quantity": 1,
- "reason": "C'est pas le bon.",
- "return_date": "2022-08-11T16:12:59.278Z"
}
]Create a product return certificate on a receipt item.
| receipt_id required | number The receipt's id |
Certificate's informations.
| receipt_item_id required | number Id of the associated receipt item. |
| quantity required | number Quantity of item returned. |
| reason required | string Reason of return. |
{- "receipt_item_id": 123,
- "quantity": 2,
- "reason": "Le produit est cassé."
}{- "id": 2,
- "receipt_item_id": 123,
- "quantity": 2,
- "reason": "Le produit est cassé.",
- "return_date": "2022-08-11T16:12:59.278Z"
}Get all product return certificates associated to the current shop.
[- {
- "id": 1,
- "receipt_item_id": 12,
- "quantity": 2,
- "reason": "C'est cassé.",
- "return_date": "2022-08-13T16:17:39.278Z"
}, - {
- "id": 2,
- "receipt_item_id": 4,
- "quantity": 1,
- "reason": "C'est pas le bon.",
- "return_date": "2022-08-11T16:12:59.278Z"
}
]