###### Client ###### Add client ********** Agrega un cliente Resource URL ============ .. http:post:: http://api.next-cloud.mx/v1/client.(format) :param format: json o xml. :reqheader Authorization: Token del usuario. :reqheader Content-Type: Formato de los datos a enviar por el body. :json int id: ID del cliente. :statuscode 200: No hay errores. :statuscode 400: Algún parámetro no se envió correctamente. :statuscode 401: Token no válido o no enviado. :statuscode 500: Error. Example request =============== .. sourcecode:: http POST http://api.next-cloud.mx/v1/client.json HTTP/1.1 Host: api.next-cloud.mx Accept: application/json Content-Type: application/json Authorization: Token ( token del usuario ) .. literalinclude:: example_client_body_01.json :language: json Example Response ================ .. sourcecode:: http HTTP/1.1 200 OK Vary: Accept Content-Type: application/json Allow: POST, PUT, OPTIONS .. literalinclude:: example_client_01.json :language: json Example XML =========== Example request --------------- .. sourcecode:: http POST http://api.next-cloud.mx/v1/client.xml HTTP/1.1 Host: api.next-cloud.mx Accept: application/xml Content-Type: application/xml Authorization: Token ( token del usuario ) .. literalinclude:: example_client_body_01.xml :language: xml Example Response ---------------- .. sourcecode:: http HTTP/1.1 200 OK Vary: Accept Content-Type: application/xml; charset=utf-8 Allow: POST, PUT, OPTIONS .. literalinclude:: example_client_01.xml :language: xml Edit client *********** Modifica los datos de un cliente. Resource URL ============ .. http:post:: http://api.next-cloud.mx/v1/client/(int:client_id).(format) :param format: json o xml. :reqheader Authorization: Token del usuario. :reqheader Content-Type: Formato de los datos a enviar por el body. :json string detail: Mensaje de respuesta. :statuscode 200: No hay errores. :statuscode 400: Algún parámetro no se envió correctamente. :statuscode 401: Token no válido o no enviado. :statuscode 500: Error. Example request =============== .. sourcecode:: http POST http://api.next-cloud.mx/v1/client.json HTTP/1.1 Host: api.next-cloud.mx Accept: application/json Content-Type: application/json Authorization: Token ( token del usuario ) .. literalinclude:: example_client_put_body_01.json :language: json Example Response ================ .. sourcecode:: http HTTP/1.1 200 OK Vary: Accept Content-Type: application/json Allow: POST, PUT, OPTIONS .. literalinclude:: example_client_put_01.json :language: json Example XML =========== Example request --------------- .. sourcecode:: http POST http://api.next-cloud.mx/v1/client.xml HTTP/1.1 Host: api.next-cloud.mx Accept: application/xml Content-Type: application/xml Authorization: Token ( token del usuario ) .. literalinclude:: example_client_put_body_01.xml :language: xml Example Response ---------------- .. sourcecode:: http HTTP/1.1 200 OK Vary: Accept Content-Type: application/xml; charset=utf-8 Allow: POST, PUT, OPTIONS .. literalinclude:: example_client_put_01.xml :language: xml