API client for aPaczka service.

1.0.8 2024-11-28 14:29 UTC

This package is auto-updated.

Last update: 2025-04-28 15:20:05 UTC


README

API client for aPaczka service.

Based on aPaczka api doc.

Requirements

  • PHP 8.0 or higher with json extensions.

Installation

The recommended way to install is through Composer.

$ composer require patryk-sawicki/apaczka

Usage

Class declaration.

$aPaczka = new Apaczka();

Services

Return an array with a list of services.

$aPaczka->services();

Pickup type

Return an array with a list of pickup type.

$aPaczka->pickupType();

Options

Return an array with a list of options.

$aPaczka->options();

Points type

Return an array with a list of points type.

$aPaczka->pointsType();

Package type

Return an array with a list of package type.

$aPaczka->packageType();

Orders

Return json response with the latest orders.

$aPaczka->orders(int $page = 0, int $limit = 10);

Order

Return json response with the order details.

$aPaczka->order(int $orderId);

Waybill

Download waybill.

$aPaczka->downloadWaybill(int $orderId);

Store waybill.

$aPaczka->storeWaybill(int $orderId, $path);

Service structure

Return json response with the service structure.

$aPaczka->serviceStructure();

Postage points

Return json response with the list of postage points.

$aPaczka->spoints(string $type);

Turn In

Download turn in.

$aPaczka->downloadTurnIn(array $orderIds);

Store turn in.

$aPaczka->storeTurnIn(array $orderIds, $path);

Pickup hours

Return json response with the pickup hours.

$aPaczka->pickupHours(string $postalCode, int $serviceId = null, bool $removeIndex = false);

Order valuation

Return json response of the order valuation.

$aPaczka->orderValuation(array $order);

Send order

Return json response of the order send.

$aPaczka->sendOrder(array $order);

Cancel order

Return json response of the order cancel.

$aPaczka->cancelOrder(int $orderId);

Changelog

Changelog is available here.