Skip to content

Endpoints

Mathieu edited this page May 23, 2022 · 20 revisions

Documentation Postman

Il est possible d'obtenir la documentation générée par postman ici.

Clients

This section applies for clients endpoints.

Root

//Method type : [GET]
/clients/

Return Json of every client

Client

//Method type : [GET]
/clients/:id

Return Json of a specify client by its ID.

Create

This method allows you to create a new client.

//Method type : [POST]
/clients/create

Non-nullable parameters :

@IsEmail()
email: string;

@IsNotEmpty()
firstname: string;

@IsNotEmpty()
lastname: string;

Products

This section applies for products endpoints.

Root

//Method type : [GET]
/products/

Return Json of every product

Product

//Method type : [GET]
/products/:id

Return Json of a specify product by its ID.

Create

This method allows you to create a new product.

//Method type : [POST]
/products/create

Non-nullable parameters :

@IsNotEmpty()
name: string;
published: boolean;
qrcode: string;

@IsNumber()
price: Decimal;

@IsDate()
warrantyExpiresOn: Date;

Extend warranty

This method allows you to exetend a product's warranty.

//Method type : [POST]
/products/warranty/extend/

Non-nullable parameters :

  @IsNotEmpty()
  id: string;

  @IsNumber()
  delay: number;

Retrieve a product

This method allows you to retrieve a product for a specify user.

//Method type : [POST]
/products/retrieve/

Non-nullable parameters :

@IsNotEmpty()
qrcode: string;

@IsNotEmpty()
ownerId: string;

Clone this wiki locally