ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • Parameters

      • request: NextRequest

      Returns Promise<
          | NextResponse<{ error: string }>
          | NextResponse<
              {
                  orders: (
                      {
                          autoGeneratedInvoice: | {
                              id: string;
                              isPaid: boolean;
                              number: string;
                              status: InvoiceStatus;
                          }
                          | null;
                          backorders: {
                              backorderSequence: number;
                              id: string;
                              number: string;
                              status: SalesOrderStatus;
                          }[];
                          client: {
                              code: string;
                              email: string
                              | null;
                              id: string;
                              name: string;
                              phone: string | null;
                          };
                          currency: | { code: string; id: string; name: string; symbol: string }
                          | null;
                          lines: (
                              {
                                  finishedProduct: (...)
                                  | (...);
                                  mrpSimulations: (...)[];
                                  tax: (...) | (...);
                              } & {}
                          )[];
                          parentOrder: { id: string; number: string }
                          | null;
                          planning:
                              | {
                                  allResourcesAvailable: boolean;
                                  confirmedAt: Date
                                  | null;
                                  confirmedProductionEndDate: Date | null;
                                  confirmedProductionStartDate: Date | null;
                                  hasCapacity: boolean;
                                  hasMaterials: boolean;
                                  hasTools: boolean;
                                  id: string;
                                  plannedProductionEndDate: Date | null;
                                  plannedProductionStartDate: Date | null;
                                  priority: string;
                                  rejectedCount: number;
                                  status: OrderPlanningStatus;
                              }
                              | null;
                          salesOffer: | {
                              id: string;
                              number: string;
                              projectName: string
                              | null;
                          }
                          | null;
                      } & {}
                  )[];
                  pagination: {
                      page: number;
                      limit: number;
                      total: number;
                      totalPages: number;
                  };
              },
          >,
      >

      /api/sales/orders: post: tags: [Sales, Orders] summary: Crée une nouvelle commande de vente description: Crée une nouvelle commande de vente requestBody: required: true content: application/json: schema: type: object responses: 201: description: Créé avec succès content: application/json: schema: type: object 400: description: Données invalides content: application/json: schema: $ref: '#/components/schemas/Error' 401: description: Non autorisé content: application/json: schema: $ref: '#/components/schemas/Error' 500: description: Erreur serveur content: application/json: schema: $ref: '#/components/schemas/Error'