{"swagger":"2.0","info":{"description":"","version":"2.0","title":"API ProductInventory"},"host":"soa-infra-prod.apigee.net","basePath":"/product-inventory/v2","schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/product":{"post":{"tags":["product"],"operationId":"productCreate","summary":"create","description":"","deprecated":false,"parameters":[{"name":"product","in":"body","required":true,"schema":{"$ref":"#/definitions/Product"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/Product"}},"400":{"description":"bad_request_technical","schema":{"$ref":"#/definitions/Error"}},"422":{"description":"bad_request_functional","schema":{"$ref":"#/definitions/Error"}},"503":{"description":"api_under_maintenance","schema":{"$ref":"#/definitions/Error"}}}},"get":{"tags":["product"],"operationId":"productList","summary":"find","description":"","deprecated":false,"parameters":[{"name":"product.id","in":"query","required":false,"description":"Identifiant du produit installé","type":"string"},{"name":"publicKey.id","in":"query","required":false,"description":"Number of the public key","type":"string"},{"name":"publicKey.name","in":"query","required":false,"description":"Type of the public key : MSISDN, PTSN,…","type":"string"},{"name":"individual.individualIdentification.type","in":"query","required":false,"description":"Identification type of individual (passport, national identity card, driver's license, social security number, birth certificate)","type":"string"},{"name":"individual.individualIdentification.identificationId","in":"query","required":false,"description":"Individual identifier","type":"string"},{"name":"organization.organizationIdentification.type","in":"query","required":false,"description":"Type of identification information used to identify the company in a country or internationally","type":"string"},{"name":"organization.organizationIdentification.identificationId","in":"query","required":false,"description":"Organization identifier","type":"string"},{"name":"BillingAccount.id","in":"query","required":false,"description":"Identifier of the billing account","type":"string"},{"name":"relatedParty.id","in":"query","required":false,"description":"Identifier of the related party (code Sirio)","type":"string"},{"name":"relatedParty.role","in":"query","required":false,"description":"Role of the related party","type":"string"},{"name":"organization.organizationIdentification.city","in":"query","required":false,"description":"City where de trade register is declared","type":"string"},{"name":"isTopLevel","in":"query","required":false,"description":"Flag to set if only the top level of products contracts is requested","type":"boolean"},{"name":"status","in":"query","required":false,"description":"Status of products contract","type":"string","enum":["active","initialised","suspended","removed","aborted"]},{"name":"fields","in":"query","required":false,"description":"list of fields in output separated by ','","type":"string"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Product"}}},"400":{"description":"bad_request_technical","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"resource_not_found","schema":{"$ref":"#/definitions/Error"}},"422":{"description":"bad_request_functional","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"internal_server_error","schema":{"$ref":"#/definitions/Error"}},"503":{"description":"api_under_maintenance","schema":{"$ref":"#/definitions/Error"}}}}},"/product/{productId}":{"get":{"tags":["product"],"operationId":"productfindById","summary":"getById","description":"","deprecated":false,"parameters":[{"name":"productId","in":"path","required":true,"type":"string"},{"name":"fields","in":"query","required":false,"description":"","type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Product"}},"400":{"description":"bad_request_technical","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"resource_not_found","schema":{"$ref":"#/definitions/Error"}},"422":{"description":"bad_request_functional","schema":{"$ref":"#/definitions/Error"}},"503":{"description":"api_under_maintenance","schema":{"$ref":"#/definitions/Error"}}}},"patch":{"tags":["product"],"operationId":"productPatch","summary":"patch","description":"","deprecated":false,"parameters":[{"name":"productId","in":"path","required":true,"type":"string"},{"name":"product","in":"body","required":true,"schema":{"$ref":"#/definitions/Product"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Product"}},"400":{"description":"bad_request_technical","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"resource_not_found","schema":{"$ref":"#/definitions/Error"}},"422":{"description":"bad_request_functional","schema":{"$ref":"#/definitions/Error"}},"503":{"description":"api_under_maintenance","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"Status":{"type":"object","properties":{"code":{"description":"Statut de l'offre","type":"string"},"startDate":{"type":"string"},"terminationDate":{"type":"string"},"statusOrigine":{"$ref":"#/definitions/StatusOrigin"}}},"StatusOrigin":{"type":"object","properties":{"originCode":{"description":"Code de l'origine de changement de statut (Cause de suspension dans le cas d'une suspension)","type":"string"},"originLabel":{"description":"libelle de l'origine de changement de statut (Cause de suspension dans le cas d'une suspension. exemple : Vol du terminal)","type":"string"}}},"Product":{"type":"object","properties":{"id":{"description":"Identifiant unique du produit/plan tarifaire (Numéro Contrat (avec product.productType = contrat))","type":"string"},"href":{"description":"Reference of the product","type":"string"},"name":{"description":"Name of the product. It could be the same as the name of the product offering","type":"string"},"description":{"description":"Is the description of the product. It could be copied from the description of the Product Offering.","type":"string"},"status":{"description":"Is the lifecycle status of the product.","type":"array","items":{"$ref":"#/definitions/Status"}},"isCustomerVisible":{"description":"If true, the product is visible by the customer.","type":"string"},"isBundle":{"description":"If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering.","type":"string"},"productSerialNumber":{"description":"Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router.","type":"string"},"startDate":{"description":"Date de début","type":"string"},"orderDate":{"description":"date de création de la commande","type":"string"},"terminationDate":{"description":"Date de fin","type":"string"},"place":{"description":"Adresse","type":"string"},"productType":{"description":"contract / Play / Set / Atomic Offer","type":"string"},"commitmentStartDate":{"description":"date de début du contrat","type":"string"},"commitmentEndDate":{"description":"Date Fin Contrat","type":"string"},"productOffering":{"description":"\"productOffering\" is a link to the product offering","$ref":"#/definitions/ProductOffering"},"productSpecification":{"$ref":"#/definitions/ProductSpecification"},"productCharacteristic":{"type":"array","items":{"$ref":"#/definitions/ProductCharacteristic"}},"productRelationship":{"type":"array","items":{"$ref":"#/definitions/ProductRelationship"}},"billingAccount":{"type":"array","items":{"$ref":"#/definitions/BillingAccount"}},"relatedParty":{"type":"array","items":{"$ref":"#/definitions/RelatedParty"}},"realizingResource":{"type":"array","items":{"$ref":"#/definitions/RealizingResource"}},"realizingService":{"type":"array","items":{"$ref":"#/definitions/RealizingService"}},"productPrice":{"type":"array","items":{"$ref":"#/definitions/ProductPrice"}},"agreement":{"type":"array","items":{"$ref":"#/definitions/Agreement"}}}},"ProductSpecification":{"description":"\"productSpecification\" is a link to the product specification. It may be useful to manage links directly to the ProductSpec, when the product is a non-bundle one you may not manage the ProductOffering link with this Product","type":"object","properties":{"id":{"description":"Unique identifier of the product specification","type":"string"},"href":{"description":"Reference of the product specification","type":"string"}}},"BillingAccount":{"description":"\"billingAccount\" is a link to the billing account on which the product is billed. This is optional because in some cases the parent is billed and not all the children","type":"object","properties":{"id":{"description":"Id du compte de facturation","type":"string"},"href":{"description":"Reference of the billing account","type":"string"},"name":{"description":"Name of the billing account","type":"string"}}},"RealizingService":{"description":"\"service\" is a link to the service that realizes the product","type":"object","properties":{"id":{"description":"Unique identifier of the service","type":"string"},"href":{"description":"Reference of the service","type":"string"}}},"RealizingResource":{"description":"\"resource\" is a link to the resource that realizes the product","type":"object","properties":{"id":{"description":"Unique identifier of the resource","type":"string"},"href":{"description":"Reference of the resource","type":"string"}}},"ProductOffering":{"description":"\"productOffering\" is a link to the product offering","type":"object","properties":{"id":{"description":"Code de l'offre (Code du plan tarifaire)  / setplay / Atomic Offer","type":"string"},"href":{"description":"Reference of the product offering","type":"string"},"name":{"description":"Libelle de l'offre (Libelle du plan tarifaire)","type":"string"}}},"Price":{"type":"object","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string"}}},"ProductPrice":{"description":"\"productPrice\" is a collection of all applicable prices for the product, it's an override of the default one specified in the ProductOffering","required":["price","validFor"],"type":"object","properties":{"name":{"description":"A short descriptive name such as \"Subscription price\".","type":"string"},"description":{"description":"A narrative that explains in detail the semantics of this product price","type":"string"},"priceType":{"description":"A category that describes the price, such as recurring, discount, allowance, penalty, and so forth.","type":"string"},"recurringChargePeriod":{"description":"Could be month, week…","type":"string"},"unitOfMeasure":{"description":"Could be minutes, GB…","type":"string"},"price":{"$ref":"#/definitions/Price"},"validFor":{"description":"The period for which the price is valid.","$ref":"#/definitions/TimePeriod"}}},"ProductRelationship":{"description":"\"productRelationships\" is a collection of a number of types of relationships between the product e.g bundle.   The value of the 'type' attribute should describe the direction of the relationship. E.g. \"isContainedIn\"","required":["product"],"type":"object","properties":{"type":{"description":"The value of the 'type' attribute should describe the direction of the relationship. E.g. \"contains\", \"isContainedIn\"","type":"string"},"product":{"$ref":"#/definitions/ProductRef"}}},"ProductRef":{"type":"object","properties":{"id":{"description":"Identifiant du produit","type":"string"},"href":{"description":"Reference of the product","type":"string"}}},"ProductCharacteristic":{"description":"\"productCharacteristics\" is a list of name value pairs to list the various relevant characteristics of the instantiated product","type":"object","properties":{"name":{"description":"Libellé de la caractéristique de l'offre /du produit/ de l'option (MSISDN/ICCID/PUK/IMEI …)","type":"string"},"value":{"description":"Valeur de la  caractéristique de l'offre /du produit/ de l'option","type":"string"}}},"Agreement":{"description":"\"agreementItem\" is a link to the agreement item for the product. Agreement item will contain the terms and conditions for the product including the product term","type":"object","properties":{"id":{"description":"Numéro du contrat","type":"string"},"herf":{"type":"string"}}},"RelatedParty":{"description":"\"relatedParties\" is a link to collection of parties. Each party will contain a role and a link","type":"object","properties":{"id":{"description":"id du party","type":"string"},"role":{"description":"role party","type":"string"},"href":{"type":"string"}}},"TimePeriod":{"type":"object","properties":{"startDateTime":{"description":"An instant of time, starting at the TimePeriod","type":"string"},"endDateTime":{"description":"An instant of time, ending at the TimePeriod","type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"description":"An integer coding the error type. This is given to caller so he can translate them if required.","type":"integer"},"message":{"description":"A short localized string that describes the error.","type":"string"},"description":{"description":"(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.","type":"string"},"infoURL":{"description":"(optional) A URL to online documentation that provides more information about the error.","type":"string"},"details":{"type":"array","items":{"$ref":"#/definitions/ErrorDetail"}}}},"ErrorDetail":{"required":["code","message"],"properties":{"code":{"description":"An integer coding the error type. This is given to caller so he can translate them if required.","type":"integer"},"message":{"description":"A short localized string that describes the error.","type":"string"},"description":{"description":"(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.","type":"string"},"infoURL":{"description":"(optional) A URL to online documentation that provides more information about the error.","type":"string"}}}}}