JsonApi – Clariprint
wiki:JsonApi
Version 6 (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"
			}

		],
		"size": "21x29.7:A4", // lxh:commentaires  peut etre renplace par width: et height:

		"with_bleeds": "1",
		"pms1": {
			"class": "PMS", // PMS / Spot / Metal
			"back": "1", // verso  
			"code": "253"
		},
		"front_colors": [
			"4-color"  /// liste des encres : c/m/y/b/4-color/quadri/q
		],
		"back_colors": [
			"4-color"
		],
		"finishing_front": "OFFSET_SATIN", // liste des finitions
		"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": ""
}

Dépliant

{
	"clariprint_product": {
		"reference": "depliant",
		"kind": "folded",
		"quantity": "3000",
		"size": "21x29,7",
		"with_bleeds": "",
		"folds": "2", // !!! type de plis
		"label": "",
		"papers": {
			"of": {
				"quality": "Offset Blanc",
				"weight": "100",
				"brand": "",
				"color": "BLANC"
			}
		},
		"front_colors": [
			"4color"
		],
		"finishing_front": "",
		"finishing_back": "",
		"creasing": "0",
		"embossing_top": "",
		"embossing_left": "",
		"embossing_height": "",
		"embossing_width": "",
		"gilding_top": "",
		"gilding_left": "",
		"gilding_height": "",
		"gilding_width": "",
		"gilding_material": "",
		"cutting_die_exists": "0",
		"cutting_die": "0",
		"holes": "1",
		"linear_perforating": "1",
		"numbering": "1",
		"wrapping_0": {
			"method": "",
			"quantity": ""
		},
		"wrapping_1": {
			"method": "",
			"quantity": ""
		},
		"wrapping_2": {
			"method": "",
			"quantity": ""
		},
		"deliveries": [
			{
				"iso": "",
				"address": "",
				"quantity": ""
			}
		],
		"proofing": "soft",
		"extra": {
			"justificative": {
				"mode": "",
				"delivery_cost": "",
				"invoice_cost": "",
				"other_cost": "",
				"address": ""
			}
		},
		"discounts_group": ""
	}
}