Persist card z indices to API.