Giter Club home page Giter Club logo

colissimo's Introduction

colissimo

Generates label and return label with Colissimo SOAP API.

Installation

npm install colissimo

How it works

You can use contractNumber/password what you usually use to connect to https://www.colissimo.entreprise.laposte.fr/

Example

const colissimo  = require('colissimo') ({ contract_number: 'YOUR_CONTRACT_NUMBER', password: 'YOUR_PASSWORD' })

colissimo.label ({
	sender: {
		last_name: 'sender last name',
		first_name: 'sender first name',
		address: 'receiver address',
		to_know: 'to know',
		zip_code: '75000',
		city: 'Paris',
		phone_number: '0600000000',
		mail: '[email protected]'
	},
	receiver: {
		last_name: 'receiver last name',
		first_name: 'receiver first name',
		address: 'receiver address',
		to_know: 'to know',
		zip_code: '75000',
		city: 'Paris',
		phone_number: '0600000000',
		mail: '[email protected]'
	},
	product: {
		identifier: '1578',				// used to identify a package when you received it. its displayed before the company_name
		insurance_value: 100,			// the amount to insure
		weight: 1.2						// in kg, default 1
	},
	format: {
		commercial_name: 'commercial_name' // used for notifications
	}
}).then (infos => {
	console.log (infos)
}).catch (error => {
	console.error (error)
})

colissimo's People

Contributors

fbellott avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

colissimo's Issues

Error NaN

Thanks for your package. I tried to use it in a nodejs app, and I the following error in console :
"Error: soap:Client: Unmarshalling Error: Not a number: NaN" and it doesn't display the tracking_number and label.
Note that the request/credentials work with postman.

How do you receive and display the results ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.