JsonApi – Clariprint
wiki:JsonApi
Version 3 (modified by Xavier P., 8 years ago)

--

Clariprint Json API

Structure d'une requête

Requête

  • Type : HTTP POST
  • url : [clariprint host]/optimproject/json.wcl
  • variables :
    • login (Client Optimproject)
    • password
    • action : chaine de charatere
    • datas : donnes au formant JSON

Réponse

  • format : Json encoded raw

Actions

CheckAuth?

Vérification des données d'authentification

  • datas : null

Réponse :

{
   'success' : (true|false)
}

QuoteRequest?

Demande de prix

datas : 
{
   clariprint_product: {
       group:string // groupe de classement dans optimproject),
       reference:string // reference du projet
       labels:list[string] // liste de label
       quantity:integer // quantité du produit
  
}

Exemples produits

Feuillet

{
	"clariprint_product": {
		"reference": "Feuillet simple",
		"kind": "leaflet",
		"quantity": "2000",
		"models": [
			{
				"reference": "Model 2",
				"quantity": "3000"
			},
			{
				"reference": "Model 3",
				"quantity": "1500"
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			},
			{
				"reference": "",
				"quantity": ""
			}
		],
		"size": "21x29.7:A4\r\n",
		"with_bleeds": "1",
		"pms1": {
			"class": "PMS",
			"back": "1",
			"code": "253"
		},
		"pms2": {
			"class": "PMS",
			"code": "pms2"
		},
		"front_colors": [
			"4-color"
		],
		"pms3": {
			"front": "",
			"back": ""
		},
		"pms4": {
			"front": "",
			"back": ""
		},
		"back_colors": [
			"4-color"
		],
		"finishing_front": "OFFSET_SATIN",
		"finishing_back": "",
		"papers": {
			"of": {
				"quality": "Couché Brillant PEFC",
				"weight": "250",
				"brand": "",
				"color": ""
			}
		},
		"creasing": "0",
		"embossing_top": "",
		"embossing_left": "",
		"embossing_height": "",
		"embossing_width": "",
		"gilding": "",
		"gilding_side": "",
		"gilding_top": "",
		"gilding_left": "",
		"gilding_height": "",
		"gilding_width": "",
		"gilding3d": "",
		"cutting_die_exists": "0",
		"cutting_die": "0",
		"holes": "0",
		"wrapping_0": {
			"method": "shrink",
			"quantity": "1000"
		},
		"wrapping_1": {
			"method": "cardboard",
			"quantity": "10"
		},
		"wrapping_2": {
			"method": "",
			"quantity": ""
		},
		"deliveries": {
			"d55044": {
				"iso": "FRA",
				"address": "",
				"quantity": ""
			}
		},
		"proofing": "soft",
		"discounts_group": ""
	},
	"clariprint_product_paper_iso": ""
}