devxnetx/bo-api-laravel

Laravel wrapper for BO-API-PHP package for burzi-obiavi.com

0.1.0 2023-08-20 13:27 UTC

This package is auto-updated.

Last update: 2024-12-20 16:16:01 UTC


README

burzi-obiavi.com JSON API documentation

Installation

You can install this package via composer

composer require devxnetx/bo-api-laravel

Config

Put your burzi-obiavi.com profile credentials in config/burziobiavi.php. There are no API keys or such

 [
    'username' => 'YOUR USERNAME',
    'password' => 'YOUR PASSWORD',
    //  You can use it for fallback - Sofia (727011)
    'city' => 727011
];

Get cities

    BurziObiavi::getCities();

Get categories

    BurziObiavi::getCategories();

Post ad

api_custom_id - Put your product id here, if we match already existing product ids, the AD data will be updated, else we create the product.

    BurziObiavi::postAd([
        "title"         => "Your Ad Title - Не приема HTML",
        "content"       => "<b>DESCRIPTION</b>",
        "price"         => "100",
        "phone"         => "0888888888",
        "city"          => 727011,
        "catid"         => 11,
        "subcatid"      => 181,
        "api_custom_id" => "ID from your system",
        "images"        => ["https://cdn.shopify.com/s/files/1/2394/4001/files/21_MAYO_e83d41cd-e674-4508-8d9a-267075361e02_480x480.jpg"]
    ]);