Download the PHP
package myparcelcom/api-specification without Composer
On this page you can find all versions of the php package
myparcelcom/api-specification. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
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.
The repository provides Docker containers to validate and preview the spec before committing changes. This is also used when validating pull requests. To install Docker, follow the steps in the documentation.
To set up the project for development run:
Commands
./mp.sh up - Start the containers which will start a server to watch file changes and reload automatically.
./mp.sh down - Stop the containers.
./mp.sh validate - Validate the specification.
NOTE: The validator only works when the containers are already running. Don't forget to start them.
To avoid discussion, the use of the above HTTP methods is described below.
PUT
Used to create or replace a resource.
Always returns the same response on repeated requests.
Needs the full resource for the request (including the id for the to be created or replaced resource).
POST
Used to create a resource.
Does not return the same response on repeated requests.
Does not need the full resource for the request (often does not need the id for the to be created resource).
PATCH
Used to update an existing resource.
Does not return the same response on repeated requests.
Does not need the full resource for the request (you might only want to update a user's name for example).
API versioning
The API versioning follows semantic versioning. The increment in version number is done manually and should be part of the pull request.
Schema file naming
Definition file names follow PascalCasing. Where every first letter of a word (including the first word) is uppercase. For example, the definition for a country code would be found in:
Path file naming
The files in specification/paths are named after their corresponding API endpoints. Where resources start with an uppercase letter and path variables with a lowercase letter. For example, the definition of the following route:
can be found in:
Parameter file naming
Parameter file names are prefixed with the corresponding parameter type. A path parameter for carrier_id would get the following file path:
Unique parameters can just remain in the path file and do not need to be extracted to their own files.
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 myparcelcom/api-specification contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.