Skillnad mellan versioner av "Surface"

Från Vendre Help
Hoppa till: navigering, sök
m (Skapade sidan med 'Finance ministers in Copenhagen have agreed to increase the size of the eurozone's rescue funds. Eurozone countries agreed to boost the joint lending power of the "firewall" fro...')
 
(POST: extended-product-data-field)
 
(22 mellanliggande versioner av 2 användare visas inte)
Rad 1: Rad 1:
Finance ministers in Copenhagen have agreed to increase the size of the eurozone's rescue funds.
+
=Surface API=
 +
Our StoreFront API to fetch data through Vue or other comparable frameworks.<br />
 +
Basepath for all calls, '''/surface/1/''', using version 1.<br />
 +
eg. '''/surface/1/request-password-change'''
  
Eurozone countries agreed to boost the joint lending power of the "firewall" from 500bn to 800bn euros ($1.1tn; �667bn).
+
==How to use==
 +
    $.post(
 +
        "/surface/1/appforsales/history/invoice",
 +
        { invoice_number : '000192' },
 +
        function(data) {
 +
            console.log(data);
 +
        }
 +
    );
  
The firewall is the permanent mechanism to bail out troubled eurozone nations.
+
    $.post(
 +
        "/surface/1/extended-product-data-field",
 +
        { "product_id": 3879, "fields": [{ "id": 11 }] },
 +
        function(data) {
 +
            console.log(data);
 +
        }
 +
    );
  
But in reality, what the eurozone countries are doing is making commitments available earlier that they had already agreed to give.
+
==NOTE==
 +
You need an active session to use the Surface-call, otherwise you will get a 401-response. (If you're using Postman or Insomnia). So work on it from the browser.
  
As Spain and Italy's finances have looked more precarious, investors have been worried about whether the eurozone's firewall could cope with more bailouts.
+
==Available Surface Calls==
 +
    All calls to appforsales/history and appforsales/realtime are cached for a short time.
  
The new enlarged fund, combined with what the International Monetary Fund has agreed to lend to the eurozone, should be enough to cope with a new crisis, some suggest.
+
===POST: appforsales/history/orders===
 +
    rows
 +
    offset
  
"Including the IMF commitments, this is enough to take care of Italy and Spain for the next three years and that was the point of this exercise," Christoph Weil, senior economist at Commerzbank in Frankfurt, told the BBC.
+
===POST: appforsales/history/order===
 +
    order_number
  
He added that he did not think Spain and Italy would require bailouts.
+
===POST: appforsales/history/invoices===
 +
    rows
 +
    offset
  
Others were less convinced.
+
===POST: appforsales/history/invoice===
 +
    invoice_number
  
"Today's decision is a classic European compromise," said Carsten Brzeski, economist at ING bank in Brussels.
+
===POST: appforsales/realtime/orders===
  
"It was as far as the German government was willing to go and it was the minimum most other eurozone countries were expecting.
+
===POST: appforsales/realtime/order===
 +
    order_number
  
"A bigger increase... could have sent a stronger signal and would have been more convincing," he said.
+
===POST: appforsales/realtime/invoices===
  
IMF head Christine Lagarde welcomed the move.
+
===POST: appforsales/realtime/invoice===
 +
    invoice_number
  
"The IMF has long emphasised that enhanced European and global firewalls, together with the implementation of strong policy frameworks, are critical for ending the crisis and securing international financial stability," she said.
+
===GET: bankid/status===
 +
    status från bankid-sessionen
 +
===GET: bankid/qr-token===
 +
    qr från bankid-sessionen
 +
===POST: bankid/login===
 +
    utgår från bankid som används
 +
===POST: custom-reports/report-request===
 +
    unique_key
 +
    email
 +
    format
 +
    filters
 +
    Hämtar användaruppgifter från sessionen
 +
===GET: custom-reports/report===
 +
*Bör ändras till GET-variabler
 +
    unique_key
 +
    format
 +
    fiilters
 +
===POST: extended-product-data-field===
 +
    BODY: { "product_id": 5555, "fields": [{ "id": 4553, "languages": [4,5,8] }, { "id": 1234 }] }
 +
 
 +
    Examples, (With array and languages)
 +
    // Send multiple fields with language specification
 +
    fetch('/surface/1/extended-product-data-field', {
 +
      method: 'POST',
 +
      headers: {
 +
        'Content-Type': 'application/json'
 +
      },
 +
      body: JSON.stringify({
 +
        fields: [
 +
          {
 +
            id: 1,
 +
            languages: [1, 2, 3]  // Specific languages id
 +
          },
 +
          {
 +
            id: 5,
 +
            languages: [1, 2]
 +
          }
 +
        ],
 +
        product_id: 123
 +
      })
 +
    })
 +
    .then(response => response.json())
 +
    .then(data => console.log(data));
 +
 
 +
    Response
 +
    {
 +
      "123": {
 +
        "1": {
 +
          "1": "Value on language 1",
 +
          "2": "Value on language 2",
 +
          "3": "Value on language 3"
 +
        },
 +
        "5": {
 +
          "1": "Value on language 1",
 +
          "2": "Value on language 2"
 +
        }
 +
      }
 +
    }
 +
 
 +
    Examples, (With list and preset language)
 +
    // Send comma-separated field IDs as string
 +
    fetch('/surface/1/extended-product-data-field', {
 +
      method: 'POST',
 +
      headers: {
 +
        'Content-Type': 'application/json'
 +
      },
 +
      body: JSON.stringify({
 +
        fields: "1,5,10",  // Comma separated string
 +
        product_id: 123
 +
      })
 +
    })
 +
    .then(response => response.json())
 +
    .then(data => console.log(data));
 +
 
 +
    Response
 +
    {
 +
      "123": {
 +
        "1": "Value",
 +
        "5": "Another value",
 +
        "10": "Third value"
 +
      }
 +
    }
 +
 
 +
===POST: login-link===
 +
    email
 +
    Hämtar marknad och språk från sessionen
 +
===GET: product-list===
 +
    hash_id
 +
===POST: product-list/shared-cart===
 +
    hämtar varukorgen från sessionen
 +
===GET: products/associated===
 +
    order_by
 +
    product_id
 +
    replace_variants
 +
    type_id
 +
===GET: products/price-log-prices===
 +
    id
 +
===GET: products/stock===
 +
    id
 +
===GET: products/configuration-price===
 +
    product_id
 +
    configuration
 +
    quantity
 +
<br>
 +
===POST: request-for-quotation===
 +
    hämtar kundid och språk från sessionen
 +
<br>
 +
===POST: request-password-change===
 +
    email
 +
    id
 +
    hämtar marknad och språk från sessionen
 +
===POST: reservations===
 +
    name
 +
    email
 +
    phone
 +
    Products
 +
    partner_id
 +
    data
 +
    Hämtar kundid från sessionen
 +
    Postar allt man skickar in
 +
===GET: shopping-cart===
 +
    Hämtar varukorgen från sessionen
 +
===DELETE: shopping-cart===
 +
    Tömmer varukorgen för sessionen
 +
===GET: shopping-cart/products===
 +
    Hämtar varukorgen från sessionen
 +
===POST: shopping-cart/products===
 +
    products
 +
===GET: tweakwise/featured-products===
 +
    display_id
 +
===POST: vql===
 +
    Separat dokumentation för Vendre Query Language
 +
    https://support.vendre.io/i/for-utvecklare-868/vql-10-vendre-query-language.html
 +
===POST: voucher/value===
 +
    voucher
 +
    Hämtar currency från sessionen
 +
===GET: briqpay/signup/b2b===
 +
===GET: briqpay/signup/b2c===
 +
===POST: briqpay/pay===
 +
===POST: briqpay/pay/validate===
 +
===POST: briqpay/approve===
 +
===POST: briqpay/reject/hard===
 +
===POST: briqpay/reject/soft===

Nuvarande version från 19 december 2025 kl. 13.23

Surface API

Our StoreFront API to fetch data through Vue or other comparable frameworks.
Basepath for all calls, /surface/1/, using version 1.
eg. /surface/1/request-password-change

How to use

   $.post(
       "/surface/1/appforsales/history/invoice",
       { invoice_number : '000192' },
       function(data) {
           console.log(data);
       }
   );
   $.post(
       "/surface/1/extended-product-data-field",
       { "product_id": 3879, "fields": [{ "id": 11 }] },
       function(data) {
           console.log(data);
       }
   );

NOTE

You need an active session to use the Surface-call, otherwise you will get a 401-response. (If you're using Postman or Insomnia). So work on it from the browser.

Available Surface Calls

   All calls to appforsales/history and appforsales/realtime are cached for a short time.

POST: appforsales/history/orders

   rows
   offset

POST: appforsales/history/order

   order_number

POST: appforsales/history/invoices

   rows
   offset

POST: appforsales/history/invoice

   invoice_number

POST: appforsales/realtime/orders

POST: appforsales/realtime/order

   order_number

POST: appforsales/realtime/invoices

POST: appforsales/realtime/invoice

   invoice_number

GET: bankid/status

   status från bankid-sessionen

GET: bankid/qr-token

   qr från bankid-sessionen

POST: bankid/login

   utgår från bankid som används

POST: custom-reports/report-request

   unique_key
   email
   format
   filters
   Hämtar användaruppgifter från sessionen

GET: custom-reports/report

  • Bör ändras till GET-variabler
   unique_key
   format
   fiilters

POST: extended-product-data-field

   BODY: { "product_id": 5555, "fields": [{ "id": 4553, "languages": [4,5,8] }, { "id": 1234 }] }
   Examples, (With array and languages)
   // Send multiple fields with language specification
   fetch('/surface/1/extended-product-data-field', {
     method: 'POST',
     headers: {
       'Content-Type': 'application/json'
     },
     body: JSON.stringify({
       fields: [
         {
           id: 1,
           languages: [1, 2, 3]  // Specific languages id
         },
         {
           id: 5,
           languages: [1, 2]
         }
       ],
       product_id: 123
     })
   })
   .then(response => response.json())
   .then(data => console.log(data));
   Response
   {
     "123": {
       "1": {
         "1": "Value on language 1",
         "2": "Value on language 2", 
         "3": "Value on language 3"
       },
       "5": {
         "1": "Value on language 1",
         "2": "Value on language 2"
       }
     }
   }
   Examples, (With list and preset language)
   // Send comma-separated field IDs as string
   fetch('/surface/1/extended-product-data-field', {
     method: 'POST',
     headers: {
       'Content-Type': 'application/json'
     },
     body: JSON.stringify({
       fields: "1,5,10",  // Comma separated string
       product_id: 123
     })
   })
   .then(response => response.json())
   .then(data => console.log(data));
   Response
   {
     "123": {
       "1": "Value",
       "5": "Another value",
       "10": "Third value"
     }
   }

POST: login-link

   email
   Hämtar marknad och språk från sessionen

GET: product-list

   hash_id

POST: product-list/shared-cart

   hämtar varukorgen från sessionen

GET: products/associated

   order_by
   product_id
   replace_variants
   type_id

GET: products/price-log-prices

   id

GET: products/stock

   id

GET: products/configuration-price

   product_id
   configuration
   quantity


POST: request-for-quotation

   hämtar kundid och språk från sessionen


POST: request-password-change

   email
   id
   hämtar marknad och språk från sessionen

POST: reservations

   name
   email
   phone
   Products
   partner_id
   data
   Hämtar kundid från sessionen
   Postar allt man skickar in

GET: shopping-cart

   Hämtar varukorgen från sessionen

DELETE: shopping-cart

   Tömmer varukorgen för sessionen

GET: shopping-cart/products

   Hämtar varukorgen från sessionen

POST: shopping-cart/products

   products

GET: tweakwise/featured-products

   display_id

POST: vql

   Separat dokumentation för Vendre Query Language
   https://support.vendre.io/i/for-utvecklare-868/vql-10-vendre-query-language.html

POST: voucher/value

   voucher
   Hämtar currency från sessionen

GET: briqpay/signup/b2b

GET: briqpay/signup/b2c

POST: briqpay/pay

POST: briqpay/pay/validate

POST: briqpay/approve

POST: briqpay/reject/hard

POST: briqpay/reject/soft