.. index:: Advertisements, Advertisement, AdvertisementRenew, Renew .. _advertisement_renew: Advertisement renewal ===================== You can renew an existing advertisement by POST against the advertisement resource. Renewal can only be done when the advertisement is about to expire. Normally, this is 7 days and can be verified using by inspecting the ``renewalPossible`` field on the advertisement. A renewal of an advertisement automatically result in an upcall in case the user has invoice_allowed as a privilege. Effectively, renewing the advertisement had the same effect as deleting the advertisement and creating the exact same advertisement again. .. apifields:: .. apifield:: :name: orderId :type: int :constraints: -- :required: false :updateable: false :writable: true Optional argument that when specified indicates that these products should be added to an existing order rather than that a new order should be created (not yet implemented) .. apifield:: :name: pay :type: boolean :constraints: -- :required: true :updateable: false :writable: true When set to true indicates that you want to immediately pay for the order via invoicing (only API partners can do this) *ONLY TRUE IS CURRENTLY SUPPORTED* Reference --------- .. endpoint:: POST /v1/advertisements/{item_id}/renew Renew an advertisement Example ------- .. include:: examples/advertisement-renew-example.rst Errors ------ .. errors:: .. error:: :http: 400 :code: invalid-expiration :description: Renewal is not possible because item is not in expiration period .. error:: :http: 400 :code: invalid-item-id :description: Renewal is not possible because item is not renewable .. error:: :http: 404 :code: advertisement-not-found :description: The provided advertisement id (itemId) is unknown .. error:: :http: 403 :code: unauthorized :description: The action you are trying to perform is not allowed .. error:: :http: 400 :code: extension-not-supported :description: It is not possible to extend the advertisement. This can have various reasons.