Skip to content

Antonio1718/servicepostal-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License Current Version

Requirements

PHP >= 5.4

Installation

composer require antonio1718/sp-api-php

If you encounter an issue, please post it here and not on the mirror repository.

<?php
require 'vendor/autoload.php';
use \Spapi\ServiceSp;

$apiKey = 'your_api_key';

$spapi = new \Spapi\SpClient($apiKey);

$data = [
	'type_enveloppe' => 'c6',
	'enveloppe' 	 => 'fenetre',
	'fichier_modele' => [
					'nom' => 'modele.docx',
					'fichier' => 'vfgklzxxctyuelp...'
					],
	'fichier_donnees' => [
					'nom' => 'donnee.csv',
					'fichier' => 'vfgklzxxctyuelp...'
	],

	'type_affranchissement' => 'lrar',
	'couleur' => 'nb',
	'recto_verso' => 'recto',
	'placement_adresse' => 'premiere_page',
	'surimpression_expediteur_document' => true,
	"impression_expediteur_enveloppe" => true,
    	"code_barre" => true,
];

$response = $spapi->send(ServiceSp::PUBLIPOSTAGE, $data);

print_r($response);

About

PHP client servicepostal API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages