Skip to content

Read Campaign

Florin D edited this page Nov 2, 2018 · 16 revisions

About

  • Reads campaign data
  • Filter and list campaign's products
  • Filter and list all other available products
  • Attention! A maximum of 10 products per products category are returned

Class

celmarket\Campaigns\CampaignsInfo

Method

readCampaign

API

  • method: campaign
  • action: readCampaign

Parameters

  • numecampanie = campaign's name
  • products = campaign's products -> array
    • start = start position
    • limit = maximum number of returned products
    • search = search field -> array
      • byName = search by name
  • avialableProducts = available products -> array
    • start = start position
    • limit = maximum number of returned products
    • search = search field -> array
      • byName = search by name

Response

An object with the following attributes

  • campaign = campaign data -> array
    • found = 1 -> found, 0 -> not found
    • data = campaign's data -> array
      • numecampanie = campaign's name
      • reducere = valoarea reducerii
      • data creare = campaing's creation date
      • datastart = start date
      • dataend = end date
      • id_campanie = campaign's ID
  • products = campaign's products
    • limit = maximum number of returned products
    • start = returned list's start position
    • moreavailable = 1 -> there are more products that haven't been returned, 0 -> there are no more products to be returned
    • data = products' data -> array
      • (array element) = product's data -> object
        • id_furnizor = supplier's / affiliate's id (the API user)
        • pretf = supplier's price
        • moneda = currency's name
          • USD = USA Dollar
          • EUR = Euro
          • RON = Romanian Leu
          • lei = Romanian Leu
        • pretlei = Lei (RON | ROL) price including VAT
        • adaos = added value
        • products_model = product's model
        • principal = 1 -> is principal, 0 -> is not principal
        • bonus = bonus products -> array
          • (array element) = bonus product -> object
            • products_name = product's name
            • products_model = product's model
        • stoc = stock value
        • cand = add date
        • pret_vechi = former price
        • id_campanie = the id of the product's campaign
        • pret_promo = promotional price computed using the Lei price and discount
        • start = start
        • end = end
        • procesare_in = processing
        • comType = type
        • status = status
        • pret_promo = product's promotional price
        • products_name = product's name
        • products_status = product's status
        • manufacturers_name = manufacturer's name
        • stoc = limited stock
          • null = infinity
    • count = the number of total products that correspond to the filter rules
  • availableProducts = available products (other than those listed in the campaign)
    • limit = maximum number of returned products
    • start = returned list's start position
    • moreavailable = 1 -> there are more products that haven't been returned, 0 -> there are no more products to be returned
    • data = products' data -> array
      • (array element) = product's data -> object
        • id_furnizor = supplier's / affiliate's id (the API user)
        • pretf = supplier's price
        • moneda = currency's name
          • USD = USA Dollar
          • EUR = Euro
          • RON = Romanian Leu
          • lei = Romanian Leu
        • pretlei = Lei (RON | ROL) price including VAT
        • adaos = added value
        • products_model = product's model
        • principal = 1 -> is principal, 0 -> is not principal
        • bonus = bonus value
        • stoc = stock value
        • cand = add date
        • pret_vechi = former price
        • id_campanie = the id of the product's campaign
        • pret_promo = promotional price computed using the Lei price and discount
        • start = start
        • end = end
        • procesare_in = processing
        • comType = type
        • status = status
        • pret_promo = product's promotional price
        • products_name = product's name
        • products_status = product's status
        • manufacturers_name = manufacturer's name
    • count = the number of total products that correspond to the filter rules

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Campaigns/3.readCampaign.php

Example - JSON

{
  "request": {
    "numecampanie": "X",
    "products":{
      "start": 0,
      "limit": 1,
      "search":{
      "byName": "X"
      }
    },
    "availableProducts": {
      "start": 0,
      "limit": 1,
      "search":{
        "byName": "X"
      }
    }
  },
  
  "response": {
    "campaign": {
      "found": 0,
      "data": {
        "numecampanie": "X",
        "reducere": "X",
        "datacreare": "01-01-2018",
        "datastart": "01-01-2018",
        "dataend": "01-01-2018"    
      }
    },
    "products": {
      "limit": 1,
      "start": 0,
      "moreavailable": 0,
      "data": [
        {
          "id_furnizor": 1,
          "pretf": 1,
          "moneda": "X",
          "pretlei": 1,
          "adaos": 1,
          "products_model": "X",
          "principal": 0,
          "bonus":[
            {
              "products_name": "X",
              "products_model": "X"
            }
          ],
          "stoc": 0,
          "cand": "01-01-2018",
          "pret_vechi": 1,
          "id_campanie": 1,
          "pret_promo": 1,
          "start": "01-01-2018",
          "end": "01-01-2018",
          "procesare_in": "X",
          "comType": "X",
          "status": 0,
          "pret_promo": 1,
          "products_name": "X",
          "manufacturers_name": "X"
        }
      ],
      "count": 1
    },
    "availableProducts":{
      "limit": 1,
            "start": 0,
            "moreavailable": 0,
            "data": [
              {
                "id_furnizor": 1,
                "pretf": 1,
                "moneda": "X",
                "pretlei": 1,
                "adaos": 1,
                "products_model": "X",
                "principal": 0,
                "bonus":[
                  {
                    "products_name": "X",
                    "products_model": "X"
                  }
                ],
                "stoc": 0,
                "cand": "01-01-2018",
                "pret_vechi": 1,
                "id_campanie": 1,
                "pret_promo": 1,
                "start": "01-01-2018",
                "end": "01-01-2018",
                "procesare_in": "X",
                "comType": "X",
                "status": 0,
                "pret_promo": 1,
                "products_name": "X",
                "manufacturers_name": "X"
              }
            ],
            "count": 1
    }
  }
}
  • Prima pagina [RO] | First page [EN]
  • Instalare [RO] | Install [EN]
  • Informatii generale [RO] | General information [EN]
  • AWB [RO] | [EN]
    • Adaugare [RO] | Import [EN]
    • Stergere [RO] | Delete [EN]
    • Listare [RO] | Print [EN]
    • Status [RO] | Status [EN]
    • Generare AWB [RO] | Generate AWB [EN]
  • Campanii [RO] | Campaigns [EN]
    • Adaugare campanie [RO] | Add campaign [EN]
    • Salvare campanie [RO] | Save campaign [EN]
    • Citire campanie [RO] | Read campaign [EN]
    • Adaugare produs in campanie [RO] | Add product to campaign [EN]
    • Salvare produs in campanie [RO] | Save product in campaign [EN]
    • Eliminare produs din campanie [RO] | Remove product from campaign [EN]
    • Listare campanii active [RO] | List active campaigns [EN]
    • Setare stoc limitat [RO] | Set limited stock [EN]
    • Preia campaniile de cupoane [RO] | Get coupon campaigns [EN]
    • Date campanie cupoane [RO] | Coupon campaign data [EN]
    • Adaugare campanie cupoane noua [RO] | Add new coupon campaign [EN]
    • Genereaza cupon [RO] | Generate coupon [EN]
    • Schimbare status cupon [RO] | Change coupon status [EN]
    • Verifica utilizarea cuponului [RO] | Check coupon usage [EN]
    • Date cupon [RO] | Coupons data [EN]
    • Adaugare grup de produse in campanie [RO] | Add group of products to campaign [EN]
  • Facturi [RO] | Invoices [EN]
    • Listeaza facturi [RO] | List invoices [EN]
    • Adaugare factura [RO] | Add invoice [EN]
    • Printare factura [RO] | Print invoice [EN]
    • Stergere factura [RO] | Remove invoice [EN]
  • Comenzi [RO] | Orders [EN]
    • Listare [RO] | List [EN]
    • Actualizare [RO] | Update [EN]
    • Datele unei comenzi [RO] | Order's data [EN]
    • Anulare [RO] | Cancel [EN]
    • Sumar [RO] | Summary [EN]
    • Setare date AWB [RO] | Set AWB data [EN]
    • Adaugarea de noi produse in comanda [RO] | Add products to order [EN]
    • Stergerea unui model de produs din comanda [RO] | Remove product model from order [EN]
    • Confirmare comanda [RO] | Confirm order [EN]
    • Listare statusuri anulare [RO] | List cancelling statuses [EN]
    • Verifica plata pentru comanda [RO] | Check payment for order [EN]
    • Reactiveaza comanda [RO] | Reactivate order [EN]
    • Preluare lista statusuri pentru comenzi [RO] | Retrieve list of statuses for orders [EN]
    • Actualizare SN [RO] | Update SN [EN]
    • Adauga observatiile comenzii[RO] | Add order observations [EN]
    • Import factura [RO] | Import Invoice [EN]
    • Stornare comanda [RO] | Order cancellation [EN]
    • Schimba statusul unui produs din comanda [RO] | Changes the status of a product from a specific order [EN]
    • Listare statusuri comenzi [RO] | List orders statuses [EN]
    • Listeaza statusurile produselor din comanda [RO] | List order product statuses [EN]
    • Preia metode de plata [RO] | Get payment methods [EN]
    • Schimba modul de plata [RO] | Change order payment method [EN]
    • Finalizeaza comanda [RO] | Finish order [EN]
    • Tipareste comanda [RO] | Print order [EN]
    • Retur produs [RO] | Return product [EN]
    • Finalizare combinata [RO] | Finish combined [EN]
    • Adaugare greutate [RO] | Add weight [EN]
    • Schimba data finalizarii [RO] | Change finishing date [EN]
    • Disputa comanda [RO] | Mark order as disputed [EN]
  • Pagini [RO] | Pages [EN]
    • Listare [RO] | List [EN]
    • Salvare [RO] | Save [EN]
    • Stergere [RO] | Remove [EN]
  • Produse [RO] | Products [EN]
    • Listare categorii [RO] | List categories [EN]
    • Listare produse [RO] | List products [EN]
    • Import produse [RO] | Import products [EN]
    • Listare status import produse [EN] | List product import status [EN]
    • Actualizare stoc, pret, status [RO] | Update stock, price, status [EN]
    • Adaugare bonus [RO] | Add bonus [EN]
    • Listare bonus [RO] | Get bonus [EN]
    • Stergere bonus [RO] | Delete bonus [EN]
    • Actualizare date [RO] | Update data [EN]
    • Listeaza caracteristicile unei categorii [RO] | List characteristics of a category [EN]
    • Adauga noi valori unei caracteristici [RO] | Add new values to a characteristic [EN]
    • Listeaza filtre [RO] | List filters [EN]
    • Listeaza caracteristicile obligatorii ale unei categorii [RO] | List mandatory characteristics of a category [RO]
    • Preluare produse live din categorie [RO] | Retrieve live products from category [EN]
    • Adauga o noua oferta unui produs existent [RO] | Add offer to existing product [EN]
    • Preia produsele live pe categorii [RO] | Get live products categories [EN]
    • Actualizeaza status produs [RO] | Update products status [EN]
    • Exporta produse [RO] | Export products [EN]
    • Listeaza familiile de produse [RO] | List product families [EN]
    • Adauga produs in familie [RO] | Add product to family [EN]
    • Preia produs din familie [RO] | Get product from family [EN]
    • Elimina produs din familie [RO] | Remove product from family [EN]
    • Actualizare promotie produs [RO] | Update product promotion [EN]
    • Preia ID producator [RO] | Get manufacturer ID [EN]
    • Adauga familie de produse [RO] | Add products family [EN]
    • Preia lista produselor in asteptare [RO] | Get waiting products list [EN]
    • Preia lista produse respinse [RO] | Get rejected products list [EN]
  • Email [RO] | Email [EN]
    • Listare email-uri pred`efinite pentru comenzi [RO] | Predefined email list for orders [EN]
    • Preia email-urile unui client pentru o comanda [RO] | Get client emails for an order [EN]
    • Trimite email aferent comenzii [RO] | Send predefined order email [EN]
    • Trimite email personalizat aferent comenzii [RO] | Send custom order email [EN]
    • Trimitere raport bug [RO] | Send bug report [EN]
    • Preia email-urile pentru produse [RO] | Retrieve products emails [EN]
    • Raspunde email-ului unui produs [RO] | Answer a specific email for a product [EN]
    • Preia cererile de service [RO] | Get service requests[EN]
    • Raspunde unei cereri de service [RO] | Answer service request [EN]
    • Preia cererile de retur [RO] | Get return requests [EN]
    • Raspunde cererii de retur [RO] | Answer return request [EN]
    • Notificare eliminare factura [RO] | Notify invoice removal [EN]
    • Preia intrebari comanda [RO] | Get order questions [EN]
    • Raspunde intrebarii comenzii [RO] | Answer order's question [EN]
    • Descarca atasamentul email-ului comenzii [RO] | Download order email attachment [EN]
    • Numara cererile de retur [RO] | Count return requests [EN]
    • Trimitere notificare de stergere a AWB-ului [RO] | Send AWB notification removal [EN]
    • Preia cerere retur [RO] | Get return request [EN]
    • Preia cerere service [RO] | Get service request [EN]
    • Preia mesajele comenzilor [RO] | Get orders messages [EN]
    • Preia numarul de mesaje fara raspuns ale comenzilor [RO] | Get unanswered orders message number [EN]
  • Informatii administrative [RO] | Administrative information [EN]
    • Date plati facturi [RO] | Invoices payment data [EN]
    • Date plati pentru o factura [RO] | Detailed payment data for an invoice [EN]
    • Istoric importuri [RO] | Import history [EN]
    • Adaugare adresa [RO] | Add address [EN]
    • Editare adresa [RO] | Edit address [EN]
    • Listare adrese [RO] | List addresses [EN]
    • Stergere adresa [RO] | Delete address [EN]
    • Actualizeaza informatiile contului [RO] | Update account information [EN]
    • Listeaza informatiile contului [RO] | List account information [EN]
    • Listeaza produsele facturabile [RO] | List billable products [EN]
    • Factureaza produse [RO] | Bill products [EN]
    • Preia cererile de service [RO] | Retrieve service requests [EN]
    • Preia taxa de transport [RO] | Retrieve transport tax[EN]
    • Actualizeaza taxa de transport [RO] | Update transport tax[EN]
    • Actualizare in grup a taxelor de transport [RO] | Bulk update transport taxes [EN]
    • Actualizeaza informatiile livrarii [RO] | Update delivery information [EN]
    • Preia informatii despre livrare [RO] | Get delivery information [EN]
    • Seteaza gata de livrare [RO] | Set as ready for delivery [EN]
    • Preia notificarile [RO] | Get notifications [EN]
    • Marcheaza notificare drept citita [RO] | Mark as seen [EN]
    • Adauga curier [RO] | Add courier [EN]
    • Preia date despre afiliat [RO] | Get affiliate's data [EN]
    • Marcheaza toate notificarile drept citite [RO] | Mark all as read [EN]
    • Preia lista curieri [RO] | Get couriers [EN]
    • Preia FAQ categorii [RO] | Get categories FAQ [EN]
    • Continut FAQ categorie [RO] | Category FAQ contents [EN]
    • Preia coduri MCC [RO] | Get MCC Codes [EN]
    • Atribuie cod MCC [RO] | Add MCC Code [EN]
    • Preia MCC-uri atribuite [RO] | Get currently used MCC [EN]
    • Elimina MCC [RO] | Remove MCC Code [EN]
    • Preia informatii despre accesul la categorii [RO] | Retrieve information about categories access [EN]
    • Cere acces la o categorie [RO] | Request category access [EN]
    • Lista cereri acces la categorii [RO] | Category access request list [EN]
    • Abonare la newsletter API [RO] | Subscribe to API newsletter [EN]
    • Dezabonare de la newsletter API [RO] | Unsubscribe from API newsletter [EN]
    • Status abonare newsletter API [RO] | Subscription status to API newsletter [EN]
    • Preia informatii combinate [RO] | Get combined information [EN]
    • Preluare prefix [RO] | Get prefix [EN]
    • Listare pagini cu incalcari de contract [RO] | List pages that breach the contract [EN]
  • Rapoarte [RO] | Reports [EN]
    • Plati cu cardul [RO] | Card payments [EN]
    • Diferenta pret [RO] | Price difference [EN]
  • Plati [RO] | Payments [EN]
    • Preia platile lunare cu cardul [RO] | Monthly card payments [EN]
    • Lunile platilor cu cardul [RO] | Card payments months [EN]
    • Lunile borderourilor [RO] | Payments summary months [EN]
    • Comisioane nefacturate [RO] | Unbilled commissions [EN]
    • Comisioane facturate [RO] | Billed commissions [EN]
    • Aproba comanda [RO] | Approve order [EN]
    • Respinge comanda [RO] | Reject order [EN]
    • Genereaza factura [RO] | Generate invoice [EN]
    • Descarca factura [RO] | Download invoice [EN]
    • Descarca borderou XLSX [RO] | Download summary XLSX [EN]
    • Descarca borderou PDF [RO] | Download summary PDF [EN]
Clone this wiki locally