Download the PHP package basalam/php-sdk without Composer

On this page you can find all versions of the php package basalam/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sdk

Basalam PHP SDK

Introduction

Welcome to the Basalam PHP SDK - a comprehensive client library for interacting with Basalam API services. This SDK provides a clean, developer-friendly interface for all Basalam services. Whether you're building a server-to-server integration or a user-facing application, this SDK provides the tools you need.

Supported PHP Versions: PHP 8.0+, PHP 8.1+, PHP 8.2+, PHP 8.3+

Key Features:

PHP Versions License

Table of Contents

Installation

📖 Full Introduction Documentation

Install the SDK using composer:

Quick Start

1. Import the SDK

2. Set up Authentication

3. Create the Client

4. Your First API Calls

Authentication

📖 Full Authentication Documentation

The SDK supports three main authentication methods:

Personal Token (For Existing Tokens)

Use this method when you already have valid access and refresh tokens:

Authorization Code Flow (For User Authentication)

Use this method when you need to authenticate on behalf of a user:

Client Credentials (For Server-to-Server)

Use this method for server-to-server applications:

Services

The SDK provides access to all Basalam services through a unified client interface.

Core Service

📖 Full Core Service Documentation

Manage vendors, products, user information, and more with the Core Service. This service provides comprehensive functionality for handling core business entities and operations: create and manage vendors, handle product creation and updates (with file upload support), product price-history and reminders, update user verification and information, handle bank account operations, and manage categories and attributes.

Deprecation: the shipping-methods helpers on this service (getShippingMethods(), getDefaultShippingMethods(), getWorkingShippingMethods(), updateShippingMethods()) are deprecated — the underlying endpoints were removed from the API. Use the new Shipping Service ($client->shipping) instead.

Key Features:

Core Methods:

Method Description Parameters
createVendor() Create new vendor userId, request: CreateVendorSchema
updateVendor() Update vendor vendorId, request: UpdateVendorSchema
getVendor() Get vendor details vendorId, prefer
getDefaultShippingMethods() Get default shipping methods None
getShippingMethods() Get shipping methods ids, vendorIds, includeDeleted, page, perPage
getWorkingShippingMethods() Get working shipping methods vendorId
updateShippingMethods() Update shipping methods vendorId, request: UpdateShippingMethodSchema
getVendorProducts() Get vendor products vendorId, queryParams: GetVendorProductsSchema
updateVendorStatus() Update vendor status vendorId, request: UpdateVendorStatusSchema
createVendorMobileChangeRequest() Create vendor mobile change vendorId, request: ChangeVendorMobileRequestSchema
createVendorMobileChangeConfirmation() Confirm vendor mobile change vendorId, request: ChangeVendorMobileConfirmSchema
createProduct() Create a new product (supports file upload) vendorId, request: ProductRequestSchema, photoFiles, videoFile
updateBulkProducts() Update multiple products vendorId, request: BatchUpdateProductsRequest
updateProduct() Update a single product (supports file upload) productId, request: ProductRequestSchema, photoFiles, videoFile
getProduct() Get product details productId, prefer
getProducts() Get products list queryParams: GetProductsQuerySchema, prefer
createProductsBulkActionRequest() Create bulk product updates vendorId, request: BulkProductsUpdateRequestSchema
updateProductVariation() Update product variation productId, variationId, request: UpdateProductVariationSchema
getProductsBulkActionRequests() Get bulk update status vendorId, page, perPage
getProductsBulkActionRequestsCount() Get bulk updates count vendorId
getProductsUnsuccessfulBulkActionRequests() Get failed updates requestId, page, perPage
getProductShelves() Get product shelves productId
createDiscount() Create discount for products vendorId, request: CreateDiscountRequestSchema
deleteDiscount() Delete discount for products vendorId, request: DeleteDiscountRequestSchema
getCurrentUser() Get current user info None
createUserMobileConfirmationRequest() Create mobile confirmation request userId
verifyUserMobileConfirmationRequest() Confirm user mobile userId, request: ConfirmCurrentUserMobileConfirmSchema
createUserMobileChangeRequest() Create mobile change request userId, request: ChangeUserMobileRequestSchema
verifyUserMobileChangeRequest() Confirm mobile change userId, request: ChangeUserMobileConfirmSchema
getUserBankAccounts() Get user bank accounts userId, prefer
createUserBankAccount() Create user bank account userId, request: UserCardsSchema, prefer
verifyUserBankAccountOtp() Verify bank account OTP userId, request: UserCardsOtpSchema
verifyUserBankAccount() Verify bank accounts userId, request: UserVerifyBankInformationSchema
deleteUserBankAccount() Delete bank account userId, bankAccountId
updateUserBankAccount() Update bank account bankAccountId, request: UpdateUserBankInformationSchema
updateUserVerification() Update user verification userId, request: UserVerificationSchema
getCategoryAttributes() Get category attributes categoryId, productId, vendorId, excludeMultiSelects
getCategories() Get all categories None
getCategory() Get specific category categoryId

Example:

Chat Service

📖 Full Chat Service Documentation

Handle messaging and chat functionalities with the Chat Service. This service provides comprehensive tools for managing conversations, messages, and chat interactions.

Key Features:

Methods:

Method Description Parameters
createMessage() Create a message request, userAgent, xClientInfo, adminToken
createChat() Create a chat request, xCreationTags, xUserSession, xClientInfo
getMessages() Get chat messages chatId, msgId, limit, chatType, order, op, tempId
getChats() Get chats list limit, orderBy, updatedFrom, updatedBefore, modifiedFrom, modifiedBefore, filters

Example:

Order Service

📖 Full Order Service Documentation

Manage baskets, payments, and invoices with the Order Service. This service provides comprehensive functionality for handling order-related operations and payment processing.

Key Features:

Methods:

Method Description Parameters
getBaskets() Get active baskets refresh
getProductVariationStatus() Get product variation status productId
createInvoicePayment() Create payment for invoice invoiceId, request
getPayableInvoices() Get payable invoices page, perPage
getUnpaidInvoices() Get unpaid invoices invoiceId, status, page, perPage, sort
getPaymentCallback() Get payment callback paymentId, request
createPaymentCallback() Create payment callback paymentId, request

Example:

Order Processing Service

📖 Full Order Processing Service Documentation

Manage customer orders, vendor parcels, and the entire order lifecycle with the Order Processing Service. This service provides comprehensive functionality to get and manage customer orders, track order items and details, handle vendor parcels and shipping, generate order statistics, and monitor order status and updates.

Key Features:

Methods:

Method Description Parameters
getCustomerOrders() Get orders filters (OrderFilter)
getCustomerOrder() Get specific order orderId
getCustomerOrderItems() Get order items filters (ItemFilter)
getCustomerOrderItem() Get specific item itemId
getVendorOrdersParcels() Get orders parcels filters (OrderParcelFilter)
getOrderParcel() Get specific parcel parcelId
getOrdersStats() Get order statistics resourceCount, vendorId, productId, customerId, couponCode, cacheControl

Example:

Wallet Service

📖 Full Wallet Service Documentation

Manage user balances, expenses, and refunds with the Wallet Service. This service provides comprehensive functionality for handling user financial operations.

Key Features:

Methods:

Method Description Parameters
getBalance() Get user's balance userId, filters, xOperatorId
getTransactions() Get transaction history userId, page, perPage, xOperatorId
createExpense() Create an expense userId, request, xOperatorId
getExpense() Get expense details userId, expenseId, xOperatorId
deleteExpense() Delete/rollback expense userId, expenseId, rollbackReasonId, xOperatorId
getExpenseByRef() Get expense by reference userId, reasonId, referenceId, xOperatorId
deleteExpenseByRef() Delete expense by reference userId, reasonId, referenceId, rollbackReasonId, xOperatorId

Example:

Search Service

📖 Full Search Service Documentation

Search for products and entities with the Search Service. This service provides powerful search capabilities.

Key Features:

Methods:

Method Description Parameters
searchProducts() Search for products request

Example:

Upload Service

📖 Full Upload Service Documentation

Upload and manage files with the Upload Service. This service provides secure file upload capabilities.

Key Features:

Methods:

Method Description Parameters
uploadFile() Upload a file file, fileType, customUniqueName, expireMinutes

Example:

Webhook Service

📖 Full Webhook Service Documentation

Manage webhook subscriptions and events with the Webhook Service. This service allows you to receive real-time notifications about events happening in your Basalam account.

Key Features:

Methods:

Method Description Parameters
getWebhookServices() Get webhook services None
createWebhookService() Create webhook service request
getWebhooks() Get webhooks list serviceId, eventIds
createWebhook() Create new webhook request
updateWebhook() Update webhook webhookId, request
deleteWebhook() Delete webhook webhookId
getWebhookEvents() Get available events None
getWebhookCustomers() Get webhook customers page, perPage, webhookId
getWebhookLogs() Get webhook logs webhookId
registerWebhook() Register client to webhook request
unregisterWebhook() Unregister client request
getRegisteredWebhooks() Get registered webhooks page, perPage, serviceId

Example:

Shipping Service

📖 Full Shipping Service Documentation

Manage the new logistics stack with the Shipping Service: shipping profiles, zones, carriers, carrier-rates, own-rates, profile-products, and free-shipping rules.

Note: This replaces the old shipping-methods endpoints that lived on the Core Service. Those Core methods (getShippingMethods(), getDefaultShippingMethods(), getWorkingShippingMethods(), updateShippingMethods()) are now deprecated — use $client->shipping instead.

Key Features:

Story Service

📖 Full Story Service Documentation

Create and explore stories, reels, and feeds with the Story Service.

Key Features:

Apps Service

📖 Full Apps Service Documentation

Handle Appstore payments and subscriptions with the Apps Service: payment methods, transactions, verification, pre-transactions, plans, and plan subscriptions.

Key Features:

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
guzzlehttp/guzzle Version ^7.0
psr/log Version ^1.0 || ^2.0 || ^3.0
psr/http-message Version ^1.0 || ^2.0
psr/http-client Version ^1.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package basalam/php-sdk contains the following files

Loading the files please wait ...